Blob


1 // kernel.cc
3 #include <uart.h>
6 namespace {
9 void
10 uart_send_string(const char *szContent)
11 {
12 const char *szCurrent = szContent;
13 while (*szCurrent)
14 {
15 Board::Uart::send(*szCurrent);
16 ++szCurrent;
17 }
18 }
21 void
22 uart_echo_test_mode()
23 {
24 uart_send_string("UART echo test mode\r\n> ");
25 for (; ; )
26 {
27 Board::Uart::send(Board::Uart::recv());
28 }
29 }
32 } // anonymous namespace
35 extern "C"
36 void
37 kernel_entry_point()
38 {
39 Board::Uart::initialize();
40 uart_send_string("Squat entry point\r\n");
42 uart_echo_test_mode();
43 }