00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is confidential property of Nordic 00004 * Semiconductor ASA.Terms and conditions of usage are described in detail 00005 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 * $LastChangedRevision: 180 $ 00012 */ 00013 00033 #ifndef HAL_UART_H__ 00034 #define HAL_UART_H__ 00035 00036 #include <stdint.h> 00037 #include <stdbool.h> 00038 00042 typedef enum 00043 { 00044 UART_BAUD_600, 00045 UART_BAUD_1K2, 00046 UART_BAUD_2K4, 00047 UART_BAUD_4K8, 00048 UART_BAUD_9K6, 00049 UART_BAUD_19K2, 00050 UART_BAUD_38K4, 00051 UART_BAUD_57K6, 00052 UART_BAUD_115K2 00053 } hal_uart_baudrate_t; 00054 00060 void hal_uart_init(hal_uart_baudrate_t baud); 00061 00065 void hal_uart_putchar(uint8_t ch); 00066 00070 bool hal_uart_tx_complete(); 00071 00079 uint8_t hal_uart_chars_available(void); 00080 00084 uint8_t hal_uart_getchar(void); 00085 00086 #endif // HAL_UART_H__ 00087