mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 10:03:33 +08:00
boards: add new spi+i2c config
Chip-select and SPI initialization uses the new config, whereas the drivers still use the existing defines. The configuration in board_config.h can be removed after all drivers are updated.
This commit is contained in:
@@ -101,7 +101,7 @@ __END_DECLS
|
||||
__EXPORT void board_peripheral_reset(int ms)
|
||||
{
|
||||
/* set the peripheral rails off */
|
||||
VDD_3V3_SENSORS_EN(false);
|
||||
board_control_spi_sensors_power(false, 0xffff);
|
||||
|
||||
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
|
||||
/* Keep Spektum on to discharge rail*/
|
||||
@@ -115,7 +115,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
|
||||
/* switch the peripheral rail back on */
|
||||
VDD_3V3_SPEKTRUM_POWER_EN(last);
|
||||
VDD_3V3_SENSORS_EN(true);
|
||||
board_control_spi_sensors_power(true, 0xffff);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -198,7 +198,7 @@ stm32_boardinitialize(void)
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
/* Power on Interfaces */
|
||||
VDD_3V3_SENSORS_EN(true);
|
||||
board_control_spi_sensors_power(true, 0xffff);
|
||||
VDD_3V3_SPEKTRUM_POWER_EN(true);
|
||||
|
||||
px4_platform_init();
|
||||
|
||||
Reference in New Issue
Block a user