From 873e38679335023b6826e59edea484986292f7eb Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Tue, 13 Oct 2015 14:26:13 +0300 Subject: [PATCH] LPC11C24 minor cleanup in sys/board* --- .../lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp | 4 +++- .../lpc11c24/test_olimex_lpc_p11c24/src/sys/board.hpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp index d5495edbaf..22bb15d010 100644 --- a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp +++ b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.cpp @@ -22,6 +22,8 @@ namespace board namespace { +constexpr unsigned TargetSystemCoreClock = 48000000; + constexpr unsigned ErrorLedPort = 1; constexpr unsigned ErrorLedPin = 10; @@ -93,7 +95,7 @@ void initClock() SystemCoreClock = Chip_Clock_GetSystemClockRate(); - while (SystemCoreClock != 48000000) { } // Loop forever if the clock failed to initialize properly + while (SystemCoreClock != TargetSystemCoreClock) { } // Loop forever if the clock failed to initialize properly } void initGpio() diff --git a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.hpp b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.hpp index cdb84fe331..21a64c4424 100644 --- a/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.hpp +++ b/libuavcan_drivers/lpc11c24/test_olimex_lpc_p11c24/src/sys/board.hpp @@ -14,6 +14,9 @@ void die(); static constexpr unsigned UniqueIDSize = 16; +/** + * Reads the globally unique 128-bit hardware ID from the MCU. + */ void readUniqueID(std::uint8_t out_uid[UniqueIDSize]); void setStatusLed(bool state); @@ -21,6 +24,9 @@ void setErrorLed(bool state); void resetWatchdog(); +/** + * Sends the string to UART. + */ void syslog(const char* msg); }