/**
* Initialisation of ADC internal registers
- * Can be called for a wake up after a shutdown command
+ * Can be called for a wake up after a shutdown command
*/
void adc_init(void)
{
* Interrupt function, other interrupts are disabled during its
* execution.
*/
-SIGNAL(SIG_ADC)
+#ifndef ADC_vect
+#if defined(SIG_ADC)
+#define ADC_vect SIG_ADC
+#endif
+#endif
+SIGNAL(ADC_vect)
{
int16_t result;
return;
result = ADC;
-
+
/* sign extension to fill the 16 bits when negative
* (for the 16 bits output format, the output is
* already right.) */
&& !(g_adc_previous_config & ADC_MODE_16_BITS)
&& (result & 0x0200) )
result |= 0xFE00;
-
+
adc_event(result);
}