Solvline Eddy DK Manuel d'utilisateur Page 120

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 150
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 119
Eddy DK Programmer Guide
120
6.8 ADC Function
Eddy CPU provides 4 channels of ADC(Analog Digital Converter).
Eddy DK board has temperature and illumination sensor for testing and the status of the sensors can be checked in
real time with ADC.
Sample program Eddy_Apps/test_adc.c uses ADC interface so users can refer to this source for developing
programs.
ADCSETCHANNEL
Function
Configures whether to use 4 channels of ADC device or not.
Format
void ioctl(int fd, ADCSETCHANNEL, int *channel);
Parameter
fd
Handle to ADC device(/dev/adc)
mode
Pointer to the buffer that stores channel configuration
Returns
None
Notice
X X X X X X X X (bits)
| | | |----- channel 1 (temperature sensor)
| | |--------- channel 2 (illumination sensor)
| |------------- channel 3 (future use)
|----------------- channel 4 (future use)
ADCGETVALUE
Function
Reads operation status of 4channels of ADC device
Format
void ioctl(int fd, ADCGETVALUE, struct adc_struct *channels);
Parameter
fd
Handle to ADC device(/dev/adc)
mode
Pointer to the buffer that will store channel operation
status
Returns
None
Notice
Struct adc_value {
int ch1_value;
int ch2_value;
int ch3_value;
int ch4_value;
};
Vue de la page 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 149 150

Commentaires sur ces manuels

Pas de commentaire