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:
Daniel Agar
2021-01-16 14:20:54 -05:00
parent cee4016665
commit 3fff512ec0
127 changed files with 863 additions and 1017 deletions
+1
View File
@@ -4,6 +4,7 @@
#------------------------------------------------------------------------------
board_adc start
system_power start
# Internal SPI
if ! ms5611 -T 5607 -s start
+1 -8
View File
@@ -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