1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/board_uart0.h

74 lines
1.4 KiB
C
Raw Normal View History

/*
* Copyright (C) 2010 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @defgroup sys_uart0 UART0
* @ingroup sys
* @brief UART0 interface abstraction
* @{
*
* @file board_uart0.h
* @brief Interface definitions for the UART0 abstraction
*/
2010-09-30 15:10:39 +02:00
#ifndef __BOARD_UART0_H
#define __BOARD_UART0_H
2010-09-30 15:10:39 +02:00
#include "kernel_types.h"
2013-12-19 16:48:31 +01:00
#include "cpu-conf.h" /* To give user access to UART0_BUFSIZE */
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2014-12-05 19:01:40 +01:00
/**
* @brief Process identifier for the UART0 module.
*/
extern kernel_pid_t uart0_handler_pid;
2010-09-30 15:10:39 +02:00
2014-12-05 19:01:40 +01:00
/**
* @brief Initialize and starts the UART0 handler.
*/
void board_uart0_init(void);
2014-12-05 19:01:40 +01:00
/**
* @brief To be called from the uart interrupt handler for every incoming
* character.
*
* @param[in] c The received character.
*/
2010-09-30 16:07:31 +02:00
void uart0_handle_incoming(int c);
2014-12-05 19:01:40 +01:00
/**
* @brief Notify the chardev thread that new characters are available in the
* ringbuffer.
*/
void uart0_notify_thread(void);
2014-12-05 19:01:40 +01:00
/**
* @brief Reads one character from the ringbuffer.
*
* @returns The first available character from the ringbuffer.
*/
int uart0_readc(void);
2014-12-05 19:01:40 +01:00
/**
* @brief Wrapper to putchar.
*
* @param[in] c The character to put on the UART.
*/
void uart0_putc(int c);
2010-09-30 15:10:39 +02:00
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
}
#endif
/** @} */
2010-09-30 15:10:39 +02:00
#endif /* __BOARD_UART0_H */