Blame


1 98601545 2023-02-18 continue // kernel.cc
2 98601545 2023-02-18 continue
3 8b3b29b7 2023-02-18 continue #include <uart.h>
4 98601545 2023-02-18 continue
5 98601545 2023-02-18 continue
6 8607cffe 2023-02-18 continue namespace {
7 98601545 2023-02-18 continue
8 8b3b29b7 2023-02-18 continue
9 98601545 2023-02-18 continue void
10 8b3b29b7 2023-02-18 continue uart_send_string(const char *szContent)
11 98601545 2023-02-18 continue {
12 98601545 2023-02-18 continue const char *szCurrent = szContent;
13 621c3fa7 2023-03-02 continue while (*szCurrent)
14 621c3fa7 2023-03-02 continue {
15 8b3b29b7 2023-02-18 continue Board::Uart::send(*szCurrent);
16 3be3b31b 2023-03-02 continue ++szCurrent;
17 3be3b31b 2023-03-02 continue }
18 98601545 2023-02-18 continue }
19 98601545 2023-02-18 continue
20 8b3b29b7 2023-02-18 continue
21 621c3fa7 2023-03-02 continue void
22 621c3fa7 2023-03-02 continue uart_echo_test_mode()
23 621c3fa7 2023-03-02 continue {
24 621c3fa7 2023-03-02 continue uart_send_string("UART echo test mode\r\n> ");
25 621c3fa7 2023-03-02 continue for (; ; )
26 621c3fa7 2023-03-02 continue {
27 621c3fa7 2023-03-02 continue Board::Uart::send(Board::Uart::recv());
28 621c3fa7 2023-03-02 continue }
29 621c3fa7 2023-03-02 continue }
30 621c3fa7 2023-03-02 continue
31 621c3fa7 2023-03-02 continue
32 8607cffe 2023-02-18 continue } // anonymous namespace
33 98601545 2023-02-18 continue
34 98601545 2023-02-18 continue
35 98601545 2023-02-18 continue extern "C"
36 98601545 2023-02-18 continue void
37 98601545 2023-02-18 continue kernel_entry_point()
38 98601545 2023-02-18 continue {
39 8b3b29b7 2023-02-18 continue Board::Uart::initialize();
40 6efd408f 2023-03-01 continue uart_send_string("Squat entry point\r\n");
41 98601545 2023-02-18 continue
42 621c3fa7 2023-03-02 continue uart_echo_test_mode();
43 98601545 2023-02-18 continue }