21#include "px_compiler.h"
24#include "px_uart_stdio.h"
38#ifdef PX_COMPILER_ARM_CC
39#pragma import(__use_no_semihosting_swi)
50#ifdef PX_COMPILER_GCC_ARM
51int _write(
int file,
char * ptr,
int len)
55 for(i = 0; i < len; i++)
62int _read(
int file,
char * ptr,
int len)
66 for(i = 0; i < len; i++)
74#ifdef PX_COMPILER_ARM_CC
75int fputc(
int ch, FILE * f)
87void _sys_exit(
int return_code)
97 px_uart_stdio_handle = handle;
99#ifdef PX_COMPILER_GCC_ARM
102 setvbuf(stdout,
NULL, _IONBF, 0);
#define NULL
NULL pointer.
void px_uart_stdio_init(px_uart_handle_t *handle)
Initialise stdio stream to use a UART driver.
int px_uart_stdio_putchar(char data)
Function to send a byte.
int px_uart_stdio_getchar(void)
Function to receive a byte.
void px_uart_putchar(px_uart_handle_t *handle, char data)
Write one byte.
char px_uart_getchar(px_uart_handle_t *handle)
Read one byte.