boards/airfy-beacon/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Christian Mehlis <mehlis@inf.fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef PERIPH_CONF_H
21 #define PERIPH_CONF_H
22 
23 #include "periph_cpu.h"
24 
25 #ifdef __cplusplus
26  extern "C" {
27 #endif
28 
36 #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator
37  16: 16MHz crystal
38  32: 32MHz crystal */
39 #define CLOCK_LFCLK (1) /* set to 0: internal RC oscillator
40  * 1: 32.768 kHz crystal
41  * 2: derived from HFCLK */
42 
48 static const timer_conf_t timer_config[] = {
49  /* dev, channels, width */
50  { NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
51 };
52 
53 #define TIMER_0_ISR isr_timer0
54 
55 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
56 
64 #define UART_NUMOF (1U)
65 #define UART_PIN_RX 17
66 #define UART_PIN_TX 18
67 
73 #define RTT_NUMOF (1U)
74 #define RTT_DEV (1) /* NRF_RTC1 */
75 #define RTT_MAX_VALUE (0x00ffffff)
76 #define RTT_FREQUENCY (1024)
77 
83 static const spi_conf_t spi_config[] = {
84  {
85  .dev = NRF_SPI0,
86  .sclk = 15,
87  .mosi = 13,
88  .miso = 14
89  }
90 };
91 
92 #define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
93 
99 static const i2c_conf_t i2c_config[] = {
100  {
101  .dev = NRF_TWI0,
102  .pin_scl = 7,
103  .pin_sda = 8,
104  .ppi = 0
105  },
106  {
107  .dev = NRF_TWI1,
108  .pin_scl = 9,
109  .pin_sda = 10,
110  .ppi = 1
111  }
112 };
113 
114 #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
115 
123 #define ADC_CONFIG {3, 4, 5, 6}
124 #define ADC_NUMOF (4)
125 
134 #define RADIO_IRQ_PRIO 1
135 
137 #ifdef __cplusplus
138 } /* end extern "C" */
139 #endif
140 
141 #endif /* PERIPH_CONF_H */
I2C configuration options.
NRF_TWI_Type * dev
hardware device
SPI module configuration options.
Timer configuration.
cc2538_ssi_t * dev
SSI device.