[X10S] PWM sticks support - with autodetection (#5251)
[X10S] PWM sticks support - with autodetection
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user