Sensoray 518 Manuel d'utilisateur Page 16

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 57
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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 */
}
Vue de la page 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 56 57

Commentaires sur ces manuels

Pas de commentaire