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:
@@ -36,12 +36,13 @@ using BSP::ReturnCode;
|
||||
using BSP::SystemTimer;
|
||||
|
||||
static BSP::Schedule::LowPowerTaskScheduler<1> g_sched;
|
||||
static BSP::GpioDriver g_gpioa(GPIOA);
|
||||
#if defined(BOARD_WATCH)
|
||||
static BSP::UsartDriver g_test_uart(USART2, g_sched);
|
||||
static BSP::GpioPin g_tx_pin(g_gpioa, 9);
|
||||
#elif defined(BOARD_DEVBOARD)
|
||||
static BSP::UsartDriver g_test_uart(USART1, g_sched);
|
||||
#endif
|
||||
static BSP::GpioDriver g_gpioa(GPIOA);
|
||||
|
||||
static BSP::time_t get_time() {
|
||||
BSP::time_t time;
|
||||
@@ -54,10 +55,14 @@ static BSP::time_t get_time() {
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
[[noreturn]] void main() {
|
||||
|
||||
g_gpioa.enable();
|
||||
|
||||
#if defined(BOARD_WATCH)
|
||||
g_tx_pin.configure_alternate_function(4);
|
||||
#endif
|
||||
|
||||
g_test_uart.init();
|
||||
|
||||
g_test_uart.tx_blocking(test_start_text);
|
||||
@@ -77,7 +82,6 @@ static BSP::time_t get_time() {
|
||||
g_test_uart.tx_blocking(buffer);
|
||||
now = get_time();
|
||||
}
|
||||
|
||||
g_test_uart.tx_blocking("STOP\r\n");
|
||||
g_test_uart.tx_blocking(test_pass_text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user