Working ADC3 driver for 9XE additional analog inputs (driver source based on Michael Blandford's code)

This commit is contained in:
Damjan Adamic
2014-12-19 20:16:23 +01:00
parent cf87849c5b
commit 6304679582
12 changed files with 164 additions and 44 deletions
+6 -1
View File
@@ -36,7 +36,7 @@
#include "../opentx.h"
volatile uint16_t Analog_values[NUMBER_ANALOG];
uint16_t Analog_values[NUMBER_ANALOG];
#if defined(FRSKY_STICKS)
const char ana_direction[NUMBER_ANALOG] = {1, 1, 0, 1 ,0 ,1 ,0, 0, 0};
@@ -127,3 +127,8 @@ void adcRead()
}
#endif
}
uint16_t getAnalogValue(uint32_t value)
{
return Analog_values[value];
}
+1 -1
View File
@@ -235,7 +235,7 @@ void disable_dsm2(uint32_t port);
// ADC driver
void adcInit();
void adcRead(void);
//extern uint16_t Analog_values[];
inline uint16_t getAnalogValue(uint32_t value);
// Buzzer driver
void buzzerSound(uint8_t duration);