mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-14 13:51:37 +08:00
new standalone drivers/system_power (split out of adc)
- system_power portion of drivers/adc split into a new standalone module (drivers/system_power) - additional availability flags added to system_power.msg so we know what boards even support (previously certain flags were faked if not available) - drivers/system_power scheduled at minimum rate by default, but now also scheduled immediately on any relevant GPIO events - now instead of running at 100 Hz with heavily reduced logging we can run at a minimal rate, log at full rate, and catch relevant changes immediately
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
board_adc start
|
||||
system_power start
|
||||
|
||||
# Internal SPI
|
||||
if ! ms5611 -T 5607 -s start
|
||||
|
||||
@@ -164,17 +164,10 @@
|
||||
#define SPEKTRUM_RX_AS_UART() /* Can be left as uart */
|
||||
#define SPEKTRUM_OUT(_one_true) px4_arch_gpiowrite(GPIO_PPM_IN_AS_OUT, (_one_true))
|
||||
|
||||
/**
|
||||
* By Providing BOARD_ADC_USB_CONNECTED (using the px4_arch abstraction)
|
||||
* this board support the ADC system_power interface, and therefore
|
||||
* provides the true logic GPIO BOARD_ADC_xxxx macros.
|
||||
*/
|
||||
|
||||
#define BOARD_ADC_USB_CONNECTED (px4_arch_gpioread(GPIO_OTGFS_VBUS))
|
||||
#define BOARD_ADC_BRICK_VALID (px4_arch_gpioread(GPIO_VDD_BRICK_VALID))
|
||||
#define BOARD_ADC_USB_VALID (px4_arch_gpioread(GPIO_VDD_USB_VALID))
|
||||
#define BOARD_ADC_SERVO_VALID (1)
|
||||
#define BOARD_ADC_PERIPH_5V_OC (0)
|
||||
#define BOARD_ADC_HIPOWER_5V_OC (0)
|
||||
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user