Update such that tests pass for v1.2
This includes minor updates for the th different MCU variant, and bugfixes. Resolves #7
This commit is contained in:
@@ -37,16 +37,19 @@ using BSP::ReturnCode;
|
||||
using BSP::SystemTimer;
|
||||
|
||||
static BSP::Schedule::LowPowerTaskScheduler<1> g_sched;
|
||||
static BSP::GpioDriver g_gpioa(GPIOA);
|
||||
static BSP::GpioDriver g_gpiob(GPIOB);
|
||||
|
||||
#if defined(BOARD_WATCH)
|
||||
static BSP::UsartDriver g_test_uart(USART2, g_sched);
|
||||
static BSP::GpioPin g_tx_pin(g_gpioa, 9);
|
||||
static BSP::LptimPwm g_test_lptim(LPTIM1);
|
||||
static BSP::GpioPin g_lptim_pin(g_gpioa, 7);
|
||||
#elif defined(BOARD_DEVBOARD)
|
||||
static BSP::UsartDriver g_test_uart(USART1, g_sched);
|
||||
static BSP::LptimPwm g_test_lptim(LPTIM2);
|
||||
#endif
|
||||
static BSP::GpioDriver g_gpioa(GPIOA);
|
||||
static BSP::GpioDriver g_gpiob(GPIOB);
|
||||
static BSP::GpioPin g_lptim_pin(g_gpiob, 2);
|
||||
#endif
|
||||
|
||||
static BSP::time_t get_time() {
|
||||
BSP::time_t time;
|
||||
@@ -63,6 +66,15 @@ static BSP::time_t get_time() {
|
||||
|
||||
g_gpioa.enable();
|
||||
g_gpiob.enable();
|
||||
|
||||
#if defined(BOARD_WATCH)
|
||||
g_tx_pin.configure_alternate_function(4);
|
||||
g_lptim_pin.configure_alternate_function(1);
|
||||
#elif defined(BOARD_DEVBOARD)
|
||||
g_lptim_pin.configure_alternate_function(1);
|
||||
#endif
|
||||
|
||||
// TODO: Fix LPTIM pin init for the L030 model
|
||||
g_lptim_pin.configure_alternate_function(1);
|
||||
|
||||
g_test_uart.init();
|
||||
|
||||
Reference in New Issue
Block a user