<commit_before>/*
 * Copyright (C) 2010 <NAME>
 *
 * 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
 */

#ifndef __BOARD_UART0_H
#define __BOARD_UART0_H

#include "kernel_types.h"
#include "cpu-conf.h"   /* To give user access to UART0_BUFSIZE */

#ifdef __cplusplus
extern "C" {
#endif

extern kernel_pid_t uart0_handler_pid;

void board_uart0_init(void);
void uart0_handle_incoming(int c);
void uart0_notify_thread(void);

int uart0_readc(void);
void uart0_putc(int c);

#ifdef __cplusplus
}
#endif

/** @} */
#endif /* __BOARD_UART0_H */<commit_msg>doc: document board_uart0 module<commit_after>/*
 * Copyright (C) 2010 <NAME>
 *
 * 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
 */

#ifndef __BOARD_UART0_H
#define __BOARD_UART0_H

#include "kernel_types.h"
#include "cpu-conf.h"   /* To give user access to UART0_BUFSIZE */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Process identifier for the UART0 module.
 */
extern kernel_pid_t uart0_handler_pid;

/**
 * @brief Initialize and starts the UART0 handler.
 */
void board_uart0_init(void);

/**
 * @brief To be called from the uart interrupt handler for every incoming
 *        character.
 *
 * @param[in] c The received character.
 */
void uart0_handle_incoming(int c);

/**
 * @brief Notify the chardev thread that new characters are available in the
 *        ringbuffer.
 */
void uart0_notify_thread(void);

/**
 * @brief Reads one character from the ringbuffer.
 *
 * @returns The first available character from the ringbuffer.
 */
int uart0_readc(void);

/**
 * @brief Wrapper to putchar.
 *
 * @param[in] c The character to put on the UART.
 */
void uart0_putc(int c);

#ifdef __cplusplus
}
#endif

/** @} */
#endif /* __BOARD_UART0_H */
{'fraction_non_alphanumeric': 0.10408765276021913, 'fraction_numerical': 0.018963337547408345, 'mean_word_length': 3.4877126654064274, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7429209', 'n_tokens_mistral': 832, 'n_tokens_neox': 800, 'n_words': 258}