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:
2020-06-03 04:51:19 +00:00
parent 0f0cb73fa5
commit cdf0f4ffc9
22 changed files with 649 additions and 57 deletions

View File

@@ -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);