[X10S] PWM sticks support - with autodetection (#5251)

[X10S] PWM sticks support - with autodetection
This commit is contained in:
Bertrand Songis
2017-10-01 09:07:07 +02:00
committed by GitHub
parent a1c0aafc16
commit cbd824eb10
7 changed files with 253 additions and 10 deletions
+10
View File
@@ -328,8 +328,10 @@ void watchdogInit(unsigned int duration);
#define NUM_XPOTS NUM_POTS
#if defined(PCBX10)
#define NUM_SLIDERS 2
#define NUM_PWMANALOGS 4
#else
#define NUM_SLIDERS 4
#define NUM_PWMANALOGS 0
#endif
enum Analogs {
STICK1,
@@ -389,6 +391,14 @@ void adcInit(void);
void adcRead(void);
uint16_t getAnalogValue(uint8_t index);
uint16_t getBatteryVoltage(); // returns current battery voltage in 10mV steps
#if NUM_PWMANALOGS > 0
extern uint8_t analogs_pwm_disabled;
#define ANALOGS_PWM_ENABLED() (analogs_pwm_disabled == false)
void pwmInit(void);
void pwmRead(uint16_t * values);
void pwmCheck();
extern volatile uint32_t pwm_interrupt_count;
#endif
#if defined(__cplusplus) && !defined(SIMU)
extern "C" {