diff --git a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp index 9eb48d883dad6d49c1b04cd8a579a8b39552e053..40a7bd3e6de0017bcccf653061e6f6d5908d7ae0 100644 --- a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp +++ b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/bsp.cpp @@ -290,11 +290,6 @@ void IRQbspInit() interfaces::uart4::rx::alternateFunction(8); interfaces::uart4::rx::mode(Mode::ALTERNATE); - interfaces::i2c1::sda::alternateFunction(4); - interfaces::i2c1::sda::mode(Mode::ALTERNATE); - interfaces::i2c1::scl::alternateFunction(4); - interfaces::i2c1::scl::mode(Mode::ALTERNATE); - interfaces::can1::tx::alternateFunction(9); interfaces::can1::tx::mode(Mode::ALTERNATE); interfaces::can1::rx::alternateFunction(9); @@ -316,22 +311,24 @@ void IRQbspInit() sensors::ADS131M08::cs::high(); sensors::LPS22DF::cs::mode(Mode::OUTPUT); sensors::LPS22DF::cs::high(); - sensors::LIS2MDL::cs::mode(Mode::OUTPUT); - sensors::LIS2MDL::cs::high(); + sensors::LIS2MDL_EXT::cs::mode(Mode::OUTPUT); + sensors::LIS2MDL_EXT::cs::high(); + sensors::LIS2MDL_IN_EXT::cs::mode(Mode::OUTPUT); + sensors::LIS2MDL_IN_EXT::cs::high(); sensors::H3LIS331DL::cs::mode(Mode::OUTPUT); sensors::H3LIS331DL::cs::high(); sensors::LSM6DSRX::cs::mode(Mode::OUTPUT); sensors::LSM6DSRX::cs::high(); sensors::UBXGps::cs::mode(Mode::OUTPUT); sensors::UBXGps::cs::high(); - sensors::PS0::cs::mode(Mode::OUTPUT); - sensors::PS0::cs::high(); - sensors::PS1::cs::mode(Mode::OUTPUT); - sensors::PS1::cs::high(); - sensors::PS2::cs::mode(Mode::OUTPUT); - sensors::PS2::cs::high(); - sensors::PS3::cs::mode(Mode::OUTPUT); - sensors::PS3::cs::high(); + sensors::ND015A_0::cs::mode(Mode::OUTPUT); + sensors::ND015A_0::cs::high(); + sensors::ND015A_1::cs::mode(Mode::OUTPUT); + sensors::ND015A_1::cs::high(); + sensors::ND015A_2::cs::mode(Mode::OUTPUT); + sensors::ND015A_2::cs::high(); + sensors::ND015A_3::cs::mode(Mode::OUTPUT); + sensors::ND015A_3::cs::high(); sensors::VN100::cs::mode(Mode::OUTPUT); sensors::VN100::cs::high(); diff --git a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/hwmapping.h b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/hwmapping.h index d4cb22e7e51970bea0485684375c959a5d7bdc78..c3435472892e85327907815ee7e4d608dc699ce9 100644 --- a/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/hwmapping.h +++ b/src/bsps/stm32f767zi_orion_biscotto/interfaces-impl/hwmapping.h @@ -111,13 +111,6 @@ using tx = Gpio<GPIOA_BASE, 0>; using rx = Gpio<GPIOA_BASE, 1>; } // namespace uart4 -// LPS28 -namespace i2c1 -{ -using sda = Gpio<GPIOB_BASE, 9>; -using scl = Gpio<GPIOB_BASE, 8>; -} // namespace i2c1 - namespace can1 { using tx = Gpio<GPIOA_BASE, 12>; @@ -148,12 +141,21 @@ namespace ADS131M08 using cs = Gpio<GPIOG_BASE, 10>; } +// Either the LPS22DF or the LIS2MDL_EXTERNAL sensors could be attached to the +// PD7 pin (not together) namespace LPS22DF { using cs = Gpio<GPIOD_BASE, 7>; } -namespace LIS2MDL +namespace LIS2MDL_EXT +{ +using cs = Gpio<GPIOD_BASE, 7>; +} + +// The PG11 pin is either attacehd to the internal or the external LIS2MDL, it +// doesn't matter software-side since they are the same sensor +namespace LIS2MDL_IN_EXT { using cs = Gpio<GPIOG_BASE, 11>; } @@ -163,7 +165,7 @@ namespace H3LIS331DL using cs = Gpio<GPIOG_BASE, 9>; } -namespace LSM6DSRX +namespace LSM6DSRX_0 { using cs = Gpio<GPIOD_BASE, 12>; } @@ -180,29 +182,27 @@ using syncIn = Gpio<GPIOB_BASE, 7>; using syncOut = Gpio<GPIOE_BASE, 3>; } // namespace VN100 -/* -namespace LSM6_1 +namespace LSM6DSRX_1 { using cs = Gpio<GPIOC_BASE, 7>; } -*/ -namespace PS0 +namespace ND015A_0 { using cs = Gpio<GPIOD_BASE, 5>; } -namespace PS1 +namespace ND015A_1 { using cs = Gpio<GPIOB_BASE, 9>; } -namespace PS2 +namespace ND015A_2 { using cs = Gpio<GPIOB_BASE, 8>; } -namespace PS3 +namespace ND015A_3 { using cs = Gpio<GPIOD_BASE, 3>; }