From 2a1018d7979fe2580f74d091795bb8d47f1519c7 Mon Sep 17 00:00:00 2001 From: Matteo Pignataro <matteo.pignataro@skywarder.eu> Date: Fri, 30 Jun 2023 13:31:35 +0000 Subject: [PATCH] [Radio] Updated tx enable and rx enable [Timers] Fixed error --- .../interfaces-impl/bsp.cpp | 5 ++--- .../interfaces-impl/hwmapping.h | 14 ++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/bsp.cpp b/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/bsp.cpp index 3463fd67..eead991b 100644 --- a/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/bsp.cpp @@ -330,15 +330,14 @@ void IRQbspInit() ADS131::cs::mode(Mode::OUTPUT); ADS131::cs::getPin().high(); - LPS28DFW_1::interrupt::mode(Mode::INPUT); - LPS28DFW_2::interrupt::mode(Mode::INPUT); - using namespace radio; cs::mode(Mode::OUTPUT); cs::getPin().high(); // dio0::mode(Mode::INPUT); dio1::mode(Mode::INPUT); dio3::mode(Mode::INPUT); + tx_enable::mode(Mode::OUTPUT); + rx_enable::mode(Mode::OUTPUT); using namespace gpios; cut_trigger::mode(Mode::OUTPUT); diff --git a/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/hwmapping.h b/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/hwmapping.h index 7a8e74da..67d6f9c3 100644 --- a/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/hwmapping.h +++ b/miosix/arch/cortexM7_stm32f7/stm32f767zi_skyward_death_stack_v4/interfaces-impl/hwmapping.h @@ -99,10 +99,10 @@ using rx = Gpio<GPIOA_BASE, 1>; namespace timers { -using tim3ch1 = Gpio<GPIOC_BASE, 6>; // Airbrakes servo -using tim3ch2 = Gpio<GPIOC_BASE, 7>; // Expulsion servo +using tim3ch1 = Gpio<GPIOC_BASE, 6>; // Airbrakes servo - Servo1 Payload +using tim3ch2 = Gpio<GPIOC_BASE, 7>; // Auxiliary - Servo2 Payload using tim1ch1 = Gpio<GPIOA_BASE, 8>; // Buzzer -using tim1ch3 = Gpio<GPIOB_BASE, 15>; // Auxiliary +using tim1ch3 = Gpio<GPIOB_BASE, 15>; // Expulsion } // namespace timers } // namespace interfaces @@ -179,14 +179,12 @@ namespace LPS28DFW_1 { using sda = interfaces::i2c1::sda; using scl = interfaces::i2c1::scl; -using interrupt = Gpio<GPIOC_BASE, 1>; } // namespace LPS28DFW_1 namespace LPS28DFW_2 { using sda = interfaces::i2c1::sda; using scl = interfaces::i2c1::scl; -using interrupt = Gpio<GPIOB_BASE, 0>; } // namespace LPS28DFW_2 } // namespace sensors @@ -200,13 +198,17 @@ using cs = Gpio<GPIOG_BASE, 11>; using dio0 = Gpio<GPIOA_BASE, 13>; using dio1 = Gpio<GPIOD_BASE, 4>; using dio3 = Gpio<GPIOC_BASE, 5>; +using rx_enable = Gpio<GPIOB_BASE, 0>; +using tx_enable = Gpio<GPIOC_BASE, 1>; } // namespace radio namespace actuators { using airbrakes = interfaces::timers::tim3ch1; -using expulsion = interfaces::timers::tim3ch2; +using expulsion = interfaces::timers::tim1ch3; using buzzer = interfaces::timers::tim1ch1; +using parafoil_servo1 = interfaces::timers::tim3ch1; +using parafoil_servo2 = interfaces::timers::tim3ch2; } // namespace actuators namespace gpios -- GitLab