Adlink ACL-8112 Series Instrukcja Użytkownika Strona 65

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 92
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 64
C Language Library 57
7.3 _8112_DI
Description
This function is used to read data from the digital input port. There are
16 bits available for the digital inputs. Bit 0 to bit 7 of the register is
defined as the low byte and bit 8 to bit 15 are defined as the high byte.
Syntax
int _8112_DI( int port_number, unsigned char *data )
int _8112pg_DI( int port_number, unsigned char *data )
Argument:
port_number:
To indicate which port is read,
DI_LO_BYTE
or DI_HI_BYTE.
DI_LO_BYTE: bit 0 ~ bit 7,
DI_HI_BYTE: bit8 ~ bit15
data:
return value from digital port.
Return Code:
ERR_NoError
ERR_BoardNoInit
ERR_PortError
Example:
See Demo program . Demo Program 'DI_DEMO.C'
Przeglądanie stron 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 91 92

Komentarze do niniejszej Instrukcji

Brak uwag