Kontron MOPSlcdLX Manuale Utente Pagina 15

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 31
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 14
KTD-S0006-B Page 12 Watchdog and Backlight
MOPSlcdLX Software Guide
4.2 Backlight Example
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#define JIDA16_INT 0x15
#define BACKL_OUT 0xEA29
#define BACKL_IN 0xEA28
#define JIDA_ID 0x4648
#define BOARD_NUM 1
void WriteBacklight (unsigned char value)
{
union REGS regs;
regs.x.ax = BACKL_OUT;
regs.x.dx = JIDA_ID;
regs.h.cl = BOARD_NUM;
regs.h.ch = value;
int86 (JIDA16_INT, &regs, &regs);
}
unsigned char ReadBacklight (void)
{
union REGS regs;
regs.x.ax = BACKL_IN;
regs.x.dx = JIDA_ID;
regs.h.cl = BOARD_NUM;
int86 (JIDA16_INT, &regs, &regs);
return regs.h.ch;
}
void main (void)
{
unsigned char val;
char str [32];
WriteBacklight (0x80);
val = ReadBacklight ();
sprintf (str, "\n%02X\n", val);
printf (str);
}
Vedere la pagina 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 30 31

Commenti su questo manuale

Nessun commento