- Rename kernel.c -> kernel.cpp and uart.c -> uart.cpp - Add universalisos::uart namespace with constexpr register definitions - Use extern "C" linkage for kernel_main() called from boot.S - Compile with arm-none-eabi-g++ using C++17 freestanding flags (-fno-exceptions, -fno-rtti, -fno-threadsafe-statics, -fno-use-cxa-atexit) - Update Makefile to use g++ and .cpp build rules
16 lines
277 B
C++
16 lines
277 B
C++
/*
|
|
* PL011 UART driver for QEMU ARM virt machine.
|
|
*/
|
|
|
|
#ifndef UNIVERSALISOS_UART_H
|
|
#define UNIVERSALISOS_UART_H
|
|
|
|
namespace universalisos::uart {
|
|
|
|
void init();
|
|
void putc(char c);
|
|
void puts(const char *s);
|
|
|
|
} // namespace universalisos::uart
|
|
|
|
#endif /* UNIVERSALISOS_UART_H */
|