HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
Loading...
Searching...
No Matches
board.h File Reference

Board interface: clocks, pins, the console UART, and the fatal panic path. More...

#include <stdint.h>
#include "homecore/devicetree.h"
Include dependency graph for board.h:

Go to the source code of this file.

Macros

#define BOARD_STRINGIFY(x)   #x
 Stringify x without macro-expanding it first.
 
#define BOARD   DT_BOARD_NAME
 Board name string from board.yaml, such as "STM32VLDISCOVERY".
 

Functions

void board_init (void)
 Initialize board clocks, pins, and the console UART.
 
uint32_t board_cpu_clock_hz (void)
 Report the core clock frequency.
 
void board_uart_putc (char c)
 Write one byte to the console UART by polling.
 
int board_uart_getc (void)
 Read one byte from the console UART, blocking until one arrives.
 
int board_uart_has_data (void)
 Check without blocking whether the console UART has received data.
 
void board_panic (const char *msg)
 Report a fatal error and halt.
 

Detailed Description

Board interface: clocks, pins, the console UART, and the fatal panic path.