Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
simple_uart.h
Go to the documentation of this file.
1  /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
2  *
3  * The information contained herein is property of Nordic Semiconductor ASA.
4  * Terms and conditions of usage are described in detail in NORDIC
5  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6  *
7  * Licensees are granted free, non-transferable use of the information. NO
8  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
9  * the file.
10  *
11  */
12 
13 #ifndef SIMPLE_UART_H
14 #define SIMPLE_UART_H
15 
16 /*lint ++flb "Enter library region" */
17 
18 #include <stdbool.h>
19 #include <stdint.h>
20 
34 uint8_t simple_uart_get(void);
35 
42 bool simple_uart_get_with_timeout(int32_t timeout_ms, uint8_t *rx_data);
43 
48 void simple_uart_put(uint8_t cr);
49 
55 void simple_uart_putstring(const uint8_t *str);
56 
65 void simple_uart_config (uint32_t baudrate,
66  uint8_t rts_pin_number,
67  uint8_t txd_pin_number,
68  uint8_t cts_pin_number,
69  uint8_t rxd_pin_number,
70  bool hwfc);
75 /*lint --flb "Leave library region" */
76 #endif
uint8_t simple_uart_get(void)
Function for reading a character from UART. Execution is blocked until UART peripheral detects charac...
Definition: simple_uart.c:22
void simple_uart_putstring(const uint8_t *str)
Function for sending a string to UART. Execution is blocked until UART peripheral reports all charact...
Definition: simple_uart.c:75
void simple_uart_put(uint8_t cr)
Function for sending a character to UART. Execution is blocked until UART peripheral reports characte...
Definition: simple_uart.c:62
bool simple_uart_get_with_timeout(int32_t timeout_ms, uint8_t *rx_data)
Function for reading a character from UART with timeout on how long to wait for the byte to be receiv...
Definition: simple_uart.c:34
void simple_uart_config(uint32_t baudrate, uint8_t rts_pin_number, uint8_t txd_pin_number, uint8_t cts_pin_number, uint8_t rxd_pin_number, bool hwfc)
UART configuration.
Definition: simple_uart.c:87