Skip to content

Commit 0bd1c2a

Browse files
committed
Add support for nrf52810
1 parent 75baa76 commit 0bd1c2a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

cores/nRF5/SDK/components/device/nrf52_to_nrf52810.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ POSSIBILITY OF SUCH DAMAGE.
4242

4343
/* Differences between latest nRF52 headers and nRF52810 headers. */
4444

45+
/* UART */
46+
/* The registers PSELRTS, PSELTXD, PSELCTS, PSELRXD were restructured into a struct. */
47+
#ifndef PSELRTS
48+
#define PSELRTS PSEL.RTS
49+
#endif
50+
#ifndef PSELTXD
51+
#define PSELTXD PSEL.TXD
52+
#endif
53+
#ifndef PSELCTS
54+
#define PSELCTS PSEL.CTS
55+
#endif
56+
#ifndef PSELRXD
57+
#define PSELRXD PSEL.RXD
58+
#endif
59+
4560
/* Interrupt service routines handlers. Note that handlers SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler and
4661
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler are not redefined since functionality is not equivalent. */
4762
#ifndef COMP_LPCOMP_IRQHandler

cores/nRF5/wiring_analog_nRF52.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,25 @@ static uint32_t saadcGain = SAADC_CH_CONFIG_GAIN_Gain1_5;
3131

3232
static NRF_PWM_Type* pwms[PWM_COUNT] = {
3333
NRF_PWM0,
34+
#if PWM_COUNT > 1
3435
NRF_PWM1,
36+
#endif
37+
#if PWM_COUNT > 2
3538
NRF_PWM2,
39+
#endif
3640
#if PWM_COUNT > 3
3741
NRF_PWM3
3842
#endif
3943
};
4044

4145
static uint32_t pwmChannelPins[PWM_COUNT] = {
4246
0xFFFFFFFF,
47+
#if PWM_COUNT > 1
4348
0xFFFFFFFF,
49+
#endif
50+
#if PWM_COUNT > 2
4451
0xFFFFFFFF,
52+
#endif
4553
#if PWM_COUNT > 3
4654
0xFFFFFFFF,
4755
#endif

0 commit comments

Comments
 (0)