Collaboration diagram for USBKEY Module:
![]() |
Modules | |
Leds Management | |
Macros to manage Leds on USB KEY. | |
Joystick Management | |
Macros to manage Joystick on USB KEY. | |
HWB button management | |
HWB button is connected to PE2 and can also be used as generic push button. | |
USB KEY Hardware data flash configuration | |
Macros to init the environnement for DF on USB KEY. | |
Defines | |
#define | ADC_TEMP_CH 0x00 |
this define is set in config.h file | |
Functions | |
U16 | Get_adc_temp_val (void) |
This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result in an U16 value. | |
S16 | Read_temperature (void) |
This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result of the temperature (in °C) in an S16 value. |
|
this define is set in config.h file
|
|
This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result in an U16 value. This function performs an ADC conversion from the stk525 TEMP channel an returns the 10 bits result in an U16 value.
Definition at line 64 of file stk_525.c. References ADC_TEMP_CH, ADCH, ADCL, Is_adc_conv_finished, and Start_conv_channel. 00065 { 00066 Start_conv_channel(ADC_TEMP_CH); 00067 while (!Is_adc_conv_finished()); 00068 return (U16)(ADCL+((U16)(ADCH<<8))); 00069 }
|
|
This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result of the temperature (in °C) in an S16 value. This function performs an ADC conversion from the stk525 POT channel an returns the 10 bits result of the temperature (in °C) in an S16 value.
Definition at line 71 of file stk_525.c. References Get_adc_temp_val(), and temperature_code. 00072 { 00073 #ifndef AVRGCC 00074 U16 adc_code; 00075 S8 index=0; 00076 adc_code=Get_adc_temp_val(); 00077 if(adc_code>temperature_code[0]) 00078 { 00079 return (S16)(-20); 00080 } 00081 else 00082 { 00083 while(temperature_code[index++]>adc_code); 00084 return (S16)(index-1-20); 00085 } 00086 #else 00087 U16 adc_code; 00088 S8 index=0; 00089 adc_code=Get_adc_temp_val(); 00090 if(adc_code>pgm_read_word_near(&temperature_code)) 00091 { 00092 return (S16)(-20); 00093 } 00094 else 00095 { 00096 while(pgm_read_word_near(&temperature_code[index++])>adc_code); 00097 return (S16)(index-1-20); 00098 } 00099 00100 #endif 00101 }
Here is the call graph for this function: ![]() |