Files
Yanis b28c406d4a Match most of libc (#80)
* started libc

* progress

* format

* match file_io.c

* match mem_funcs and math_api

* printf prog and match strtoul.c

* format

* match bsearch.c

* match ansi_fp.c

* make USE_CURRENT_LOCALE a global define

* started time.c

* match the printf function

* add splits for oot-u and oot-e

* cleanup

* review
2025-05-11 14:58:29 +02:00

45 lines
921 B
C

#ifndef _UART_H
#define _UART_H
#ifdef __cplusplus
extern "C" {
#endif
typedef int UARTError;
enum {
kUARTNoError = 0,
kUARTUnknownBaudRate,
kUARTConfigurationError,
kUARTBufferOverflow, /* specified buffer was too small */
kUARTNoData /* no data available from polling */
};
typedef enum {
kBaudHWSet = -1, /* use HW settings such as DIP switches */
kBaud300 = 300, /* valid baud rates */
kBaud600 = 600,
kBaud1200 = 1200,
kBaud1800 = 1800,
kBaud2000 = 2000,
kBaud2400 = 2400,
kBaud3600 = 3600,
kBaud4800 = 4800,
kBaud7200 = 7200,
kBaud9600 = 9600,
kBaud19200 = 19200,
kBaud38400 = 38400,
kBaud57600 = 57600,
kBaud115200 = 115200,
kBaud230400 = 230400
} UARTBaudRate;
extern UARTError InitializeUART(UARTBaudRate baudRate);
extern UARTError WriteUARTN(const void* bytes, unsigned long length);
#ifdef __cplusplus
}
#endif
#endif