nrf52/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2017 Freie Universit├Ąt Berlin
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 
19 #ifndef PERIPH_CPU_H
20 #define PERIPH_CPU_H
21 
22 #include "periph_cpu_common.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #define CLOCK_CORECLOCK (64000000U)
32 
37 #define UART_IRQN (UARTE0_UART0_IRQn)
38 #define SPI_SCKSEL (dev(bus)->PSEL.SCK)
39 #define SPI_MOSISEL (dev(bus)->PSEL.MOSI)
40 #define SPI_MISOSEL (dev(bus)->PSEL.MISO)
41 
46 #define ADC_NUMOF (9U)
47 
51 enum {
52  NRF52_AIN0 = 0,
53  NRF52_AIN1 = 1,
54  NRF52_AIN2 = 2,
55  NRF52_AIN3 = 3,
56  NRF52_AIN4 = 4,
57  NRF52_AIN5 = 5,
58  NRF52_AIN6 = 6,
59  NRF52_AIN7 = 7,
60  NRF52_VDD = 8,
61 };
62 
67 #define HAVE_ADC_RES_T
68 typedef enum {
69  ADC_RES_6BIT = 0xf0,
70  ADC_RES_8BIT = 0x00,
71  ADC_RES_10BIT = 0x01,
72  ADC_RES_12BIT = 0x02,
73  ADC_RES_14BIT = 0xf1,
74  ADC_RES_16BIT = 0xf2
75 } adc_res_t;
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* PERIPH_CPU_H */
83 
Analog Input 3.
ADC resolution: 12 bit.
Analog Input 7.
supported with oversampling, not implemented
ADC resolution: 10 bit.
Analog Input 6.
not supported by hardware
ADC resolution: 8 bit.
not supported by hardware
Analog Input 0.
Analog Input 1.
Analog Input 5.
Analog Input 4.
Analog Input 2.
VDD, not useful if VDD is reference...