aboutsummaryrefslogtreecommitdiff
path: root/projects/board-test/rtc-test.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-17 00:27:11 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-17 00:27:11 -0400
commit03b14b4cd4a214a92e3968ff33a13c2086896864 (patch)
tree4b391205211d55a0cba4750682784f5d1799fb44 /projects/board-test/rtc-test.c
parent5af4a915edf3e77705fa2625081200b61f8dda26 (diff)
Overhaul UART API
MGMT is the default UART, and no one should have to explicitly refer to the UART unless they need USER (hsm.c:hal_serial_send_char). The default UART is now exposed in the header file, so that the default-using functions can be macros, which saves a few bytes in code space, and a few microseconds in function call overhead.
Diffstat (limited to 'projects/board-test/rtc-test.c')
-rw-r--r--projects/board-test/rtc-test.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/projects/board-test/rtc-test.c b/projects/board-test/rtc-test.c
index f1c2db1..bbb297a 100644
--- a/projects/board-test/rtc-test.c
+++ b/projects/board-test/rtc-test.c
@@ -94,7 +94,7 @@ void dump_sram()
request_data(buf, RTC_RTC_ADDR, 0x0, RTC_SRAM_TOTAL_BYTES);
uart_send_string("SRAM contents:\r\n");
- uart_send_hexdump(STM_UART_MGMT, buf, 0, RTC_SRAM_TOTAL_BYTES);
+ uart_send_hexdump(buf, 0, RTC_SRAM_TOTAL_BYTES);
uart_send_string("\r\n");
}
@@ -104,12 +104,12 @@ void dump_eeprom()
request_data(buf, RTC_EEPROM_ADDR, 0x0, RTC_EEPROM_TOTAL_BYTES);
uart_send_string("EEPROM contents:\r\n");
- uart_send_hexdump(STM_UART_MGMT, buf, 0, RTC_EEPROM_TOTAL_BYTES);
+ uart_send_hexdump(buf, 0, RTC_EEPROM_TOTAL_BYTES);
uart_send_string("\r\n");
request_data(buf, RTC_EEPROM_ADDR, RTC_EEPROM_EUI48_OFFSET, RTC_EEPROM_EUI48_BYTES);
uart_send_string("EEPROM EUI-48:\r\n");
- uart_send_hexdump(STM_UART_MGMT, buf, RTC_EEPROM_EUI48_OFFSET, RTC_EEPROM_EUI48_BYTES);
+ uart_send_hexdump(buf, RTC_EEPROM_EUI48_OFFSET, RTC_EEPROM_EUI48_BYTES);
uart_send_string("\r\n");
}
@@ -131,7 +131,6 @@ int
main()
{
stm_init();
- uart_set_default(STM_UART_MGMT);
uart_send_string("\r\n\r\n*** Init done\r\n");
dump_sram();