Skip to content

Commit 44e4c4a

Browse files
author
Richard Unger
committed
fix for compile on Itsy Bitsy M4 #217
1 parent e29ee8c commit 44e4c4a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/drivers/hardware_specific/samd51_mcu.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,36 @@
1414
#endif
1515

1616

17+
#ifndef TCC3_CH0
18+
#define TCC3_CH0 NOT_ON_TIMER
19+
#define TCC3_CH1 NOT_ON_TIMER
20+
#endif
21+
22+
#ifndef TCC4_CH0
23+
#define TCC4_CH0 NOT_ON_TIMER
24+
#define TCC4_CH1 NOT_ON_TIMER
25+
#endif
26+
27+
28+
#ifndef TC4_CH0
29+
#define TC4_CH0 NOT_ON_TIMER
30+
#define TC4_CH1 NOT_ON_TIMER
31+
#endif
32+
33+
#ifndef TC5_CH0
34+
#define TC5_CH0 NOT_ON_TIMER
35+
#define TC5_CH1 NOT_ON_TIMER
36+
#endif
37+
38+
#ifndef TC6_CH0
39+
#define TC6_CH0 NOT_ON_TIMER
40+
#define TC6_CH1 NOT_ON_TIMER
41+
#endif
42+
43+
#ifndef TC7_CH0
44+
#define TC7_CH0 NOT_ON_TIMER
45+
#define TC7_CH1 NOT_ON_TIMER
46+
#endif
1747

1848

1949

@@ -109,7 +139,12 @@ struct wo_association WO_associations[] = {
109139

110140
wo_association ASSOCIATION_NOT_FOUND = { NOT_A_PORT, 0, NOT_ON_TIMER, 0, NOT_ON_TIMER, 0, NOT_ON_TIMER, 0};
111141

142+
#ifndef TCC3_CC_NUM
143+
uint8_t TCC_CHANNEL_COUNT[] = { TCC0_CC_NUM, TCC1_CC_NUM, TCC2_CC_NUM };
144+
#else
112145
uint8_t TCC_CHANNEL_COUNT[] = { TCC0_CC_NUM, TCC1_CC_NUM, TCC2_CC_NUM, TCC3_CC_NUM, TCC4_CC_NUM };
146+
#endif
147+
113148

114149
struct wo_association& getWOAssociation(EPortType port, uint32_t pin) {
115150
for (int i=0;i<NUM_WO_ASSOCIATIONS;i++) {

0 commit comments

Comments
 (0)