Sensoray 518 Instrukcja Użytkownika Strona 16

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 57
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 15
15
/******************************** C DRIVERS ****************************/
/* ADSENDBYTE handshakes a command byte to the 518 command register */
void adSendByte ( short base_port, short cmd_byte )
{
while ( ( inp( base_port + 1 ) & 128 ) == 0 ) ;
/* wait for CRMT */
outp ( base_port, cmd_byte ) ;/* send the byte */
}
/* ADREADBYTE handshakes a data byte from the 518 data register */
short adReadByte ( short base_port )
{
while ( ( inp ( base_port + 1 ) & 64 ) == 0 ) ; /* wait for DAV */
return ( inp ( base_port ) ) ; /* read the byte */
}
/* ADSENDWORD handshakes a 16-bit value to the 518 */
void adSendByte ( short base_port, short cmd_word )
{
adSendByte ( base_port, cmd_word >> 8 ) ; /* send high byte */
adSendByte ( base_port, cmd_word ) ; /* send low byte */
}
/* ADREADWORD handshakes a data byte from the 518 */
short adReadWord ( short base_port )
{
short hiByte = adReadByte ( base_port ) << 8 ; /* read high byte */
return ( hiByte | adReadByte ( base_port ) ) ; /* read & concatenate low byte */
}
Przeglądanie stron 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 56 57

Komentarze do niniejszej Instrukcji

Brak uwag