BSPACM  20150113
Board Support Package for ARM Cortex-M Microcontrollers
default_appconf.h
Go to the documentation of this file.
1 /* BSPACM - config header for generic nRF51 boards
2  *
3  * Written in 2014 by Peter A. Bigot <http://pabigot.github.io/bspacm/>
4  *
5  * To the extent possible under law, the author(s) have dedicated all
6  * copyright and related and neighboring rights to this software to
7  * the public domain worldwide. This software is distributed without
8  * any warranty.
9  *
10  * You should have received a copy of the CC0 Public Domain Dedication
11  * along with this software. If not, see
12  * <http://creativecommons.org/publicdomain/zero/1.0/>.
13  */
14 
33 #ifndef BSPACM_DEVICE_NRF51_BOARD_DEFAULT_APPCONF_H
34 #define BSPACM_DEVICE_NRF51_BOARD_DEFAULT_APPCONF_H
35 
36 /* UART0 is the only UART, so it's the default unless it's explicitly
37  * disabled. */
38 #ifndef BSPACM_CONFIG_DEFAULT_UART0
39 #define BSPACM_CONFIG_DEFAULT_UART0 1
40 #endif /* BSPACM_CONFIG_DEFAULT_UART0 */
41 
42 #ifndef BSPACM_CONFIG_ENABLE_UART0
43 #define BSPACM_CONFIG_ENABLE_UART0 (BSPACM_CONFIG_DEFAULT_UART0 - 0)
44 #endif /* BSPACM_CONFIG_ENABLE_UART0 */
45 
46 #ifndef BSPACM_CONFIG_ENABLE_UART
47 #define BSPACM_CONFIG_ENABLE_UART (BSPACM_CONFIG_ENABLE_UART0 - 0)
48 #endif /* BSPACM_CONFIG_ENABLE_UART */
49 
50 /* Propagate default UART constants to UART0. */
51 
52 #if defined(BSPACM_CONFIG_DEFAULT_UART_TX_BUFFER_SIZE)
53 #if (BSPACM_CONFIG_DEFAULT_UART0 - 0) && ! defined(BSPACM_PERIPH_UART0_TX_BUFFER_SIZE)
54 #define BSPACM_PERIPH_UART0_TX_BUFFER_SIZE BSPACM_CONFIG_DEFAULT_UART_TX_BUFFER_SIZE
55 #endif /* select default UART */
56 #endif /* propagate default TX_BUFFER_SIZE */
57 
58 #if defined(BSPACM_CONFIG_DEFAULT_UART_RX_BUFFER_SIZE)
59 #if (BSPACM_CONFIG_DEFAULT_UART0 - 0) && ! defined(BSPACM_PERIPH_UART0_RX_BUFFER_SIZE)
60 #define BSPACM_PERIPH_UART0_RX_BUFFER_SIZE BSPACM_CONFIG_DEFAULT_UART_RX_BUFFER_SIZE
61 #endif /* select default UART */
62 #endif /* propagate default TX_BUFFER_SIZE */
63 
64 #endif /* BSPACM_DEVICE_NRF51_BOARD_DEFAULT_APPCONF_H */