diff --git a/firmware/projects/DemoProjectRTOS/platforms/stm32f767/bindings.cc b/firmware/projects/DemoProjectRTOS/platforms/stm32f767/bindings.cc index 77a2f1995..f9cf88b40 100644 --- a/firmware/projects/DemoProjectRTOS/platforms/stm32f767/bindings.cc +++ b/firmware/projects/DemoProjectRTOS/platforms/stm32f767/bindings.cc @@ -18,9 +18,11 @@ void SystemClock_Config(); } namespace mcal { -periph::DigitalInput button_di{ButtonPin_GPIO_Port, ButtonPin_Pin}; -periph::DigitalOutput indicator_do{LedPin_GPIO_Port, LedPin_Pin}; -periph::DigitalOutput indicator2_do{LedPin2_GPIO_Port, LedPin2_Pin}; +using namespace stm32f767::periph; + +DigitalInput button_di{ButtonPin_GPIO_Port, ButtonPin_Pin}; +DigitalOutput indicator_do{LedPin_GPIO_Port, LedPin_Pin}; +DigitalOutput indicator2_do{LedPin2_GPIO_Port, LedPin2_Pin}; } // namespace mcal namespace bindings { diff --git a/firmware/projects/DemoProjectRTOS/platforms/stm32f767/os.cc b/firmware/projects/DemoProjectRTOS/platforms/stm32f767/os.cc index bf762c1eb..01041ab25 100644 --- a/firmware/projects/DemoProjectRTOS/platforms/stm32f767/os.cc +++ b/firmware/projects/DemoProjectRTOS/platforms/stm32f767/os.cc @@ -22,10 +22,12 @@ extern osTimerId_t messageTimerHandle; } namespace mcal { -os::Semaphore sem_test{&testBinarySemaphoreHandle}; -os::Mutex mutex_test{&testMutexHandle}; -os::Fifo message_queue_test{&myTestQueueHandle}; -os::Timer timer_test{&messageTimerHandle}; +using namespace stm32f767::os; + +Semaphore sem_test{&testBinarySemaphoreHandle}; +Mutex mutex_test{&testMutexHandle}; +Fifo message_queue_test{&myTestQueueHandle}; +Timer timer_test{&messageTimerHandle}; } // namespace mcal namespace os { diff --git a/firmware/projects/FrontController/platforms/stm32f767/bindings.cc b/firmware/projects/FrontController/platforms/stm32f767/bindings.cc index fc51fc2d0..baa790979 100644 --- a/firmware/projects/FrontController/platforms/stm32f767/bindings.cc +++ b/firmware/projects/FrontController/platforms/stm32f767/bindings.cc @@ -14,15 +14,16 @@ #include "mcal/stm32f767/periph/gpio.h" namespace mcal { -mcal::periph::DigitalOutput driver_speaker{RTDS_EN_GPIO_Port, RTDS_EN_Pin}; -mcal::periph::DigitalOutput brake_light{BRAKE_LIGHT_EN_GPIO_Port, - BRAKE_LIGHT_EN_Pin}; -mcal::periph::ADCInput accel_pedal_1{&hadc1, ADC_CHANNEL_10}; -mcal::periph::ADCInput accel_pedal_2{&hadc1, ADC_CHANNEL_11}; -mcal::periph::ADCInput steering_wheel{&hadc1, ADC_CHANNEL_12}; -mcal::periph::ADCInput brake_pedal{&hadc1, ADC_CHANNEL_13}; -mcal::periph::DigitalInput driver_button{START_BUTTON_N_GPIO_Port, - START_BUTTON_N_Pin}; +using namespace stm32f767::periph; + +DigitalOutput driver_speaker{RTDS_EN_GPIO_Port, RTDS_EN_Pin}; +DigitalOutput brake_light{BRAKE_LIGHT_EN_GPIO_Port, BRAKE_LIGHT_EN_Pin}; +ADCInput accel_pedal_1{&hadc1, ADC_CHANNEL_10}; +ADCInput accel_pedal_2{&hadc1, ADC_CHANNEL_11}; +ADCInput steering_wheel{&hadc1, ADC_CHANNEL_12}; +ADCInput brake_pedal{&hadc1, ADC_CHANNEL_13}; +DigitalInput driver_button{START_BUTTON_N_GPIO_Port, START_BUTTON_N_Pin}; + } // namespace mcal extern "C" { diff --git a/firmware/projects/TMS/platforms/stm32f767/bindings.cc b/firmware/projects/TMS/platforms/stm32f767/bindings.cc index 1e478e794..8a8f35b0c 100644 --- a/firmware/projects/TMS/platforms/stm32f767/bindings.cc +++ b/firmware/projects/TMS/platforms/stm32f767/bindings.cc @@ -26,8 +26,8 @@ void SystemClock_Config(); } namespace mcal { - using namespace stm32f767::periph; + ADCInput temp_sensor_adc_1{&hadc1, SENS_1_UC_IN_CHANNEL}; ADCInput temp_sensor_adc_2{&hadc1, SENS_2_UC_IN_CHANNEL}; ADCInput temp_sensor_adc_3{&hadc1, SENS_3_UC_IN_CHANNEL}; diff --git a/firmware/projects/TMS/platforms/windows/bindings.cc b/firmware/projects/TMS/platforms/windows/bindings.cc index 38c0ba992..b658021b3 100644 --- a/firmware/projects/TMS/platforms/windows/bindings.cc +++ b/firmware/projects/TMS/platforms/windows/bindings.cc @@ -12,15 +12,19 @@ #include "shared/periph/pwm.h" namespace mcal { -periph::ADCInput temp_sensor_adc_1{"Temperature Sensor 1"}; -periph::ADCInput temp_sensor_adc_2{"Temperature Sensor 2"}; -periph::ADCInput temp_sensor_adc_3{"Temperature Sensor 3"}; -periph::ADCInput temp_sensor_adc_4{"Temperature Sensor 4"}; -periph::ADCInput temp_sensor_adc_5{"Temperature Sensor 5"}; -periph::ADCInput temp_sensor_adc_6{"Temperature Sensor 6"}; -periph::PWMOutput fan_controller_pwm{"Fan Controller"}; -periph::DigitalOutput debug_do_blue{"Debug: Blue"}; -periph::DigitalOutput debug_do_red{"Debug: Red"}; +using namespace windows::periph; + +ADCInput temp_sensor_adc_1{"Temperature Sensor 1"}; +ADCInput temp_sensor_adc_2{"Temperature Sensor 2"}; +ADCInput temp_sensor_adc_3{"Temperature Sensor 3"}; +ADCInput temp_sensor_adc_4{"Temperature Sensor 4"}; +ADCInput temp_sensor_adc_5{"Temperature Sensor 5"}; +ADCInput temp_sensor_adc_6{"Temperature Sensor 6"}; + +PWMOutput fan_controller_pwm{"Fan Controller"}; +DigitalOutput debug_do_blue{"Debug: Blue"}; +DigitalOutput debug_do_red{"Debug: Red"}; + } // namespace mcal namespace bindings {