Skip to content

Commit b923678

Browse files
committed
radio workin, all pins accounted for
USB reset->boot and baud set (?) is flakey, probably made a typo during USB port earlier
1 parent 03844b1 commit b923678

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

variants/zero_radio/variant.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ const PinDescription g_APinDescription[]=
120120
// 2..12
121121
// Digital Low
122122
{ PORTA, 14, PIO_SERCOM, (PIN_ATTR_DIGITAL), No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_14 }, // SPI MISO SERCOM 2.2
123-
{ PORTA, 9, PIO_TIMER, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), No_ADC_Channel, PWM0_CH1, TCC0_CH1, EXTERNAL_INT_9 }, // TCC0/WO[1]
124-
{ PORTA, 8, PIO_TIMER, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), No_ADC_Channel, PWM0_CH0, TCC0_CH0, EXTERNAL_INT_NMI }, // TCC0/WO[0]
123+
{ PORTA, 9, PIO_TIMER, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel17, PWM0_CH1, TCC0_CH1, EXTERNAL_INT_9 }, // TCC0/WO[1]
124+
{ PORTA, 8, PIO_TIMER, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel16, PWM0_CH0, TCC0_CH0, EXTERNAL_INT_NMI }, // TCC0/WO[0]
125125
{ PORTA, 15, PIO_TIMER, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), No_ADC_Channel, PWM3_CH1, TC3_CH1, EXTERNAL_INT_15 }, // TC3/WO[1]
126126
{ PORTA, 20, PIO_TIMER_ALT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER_ALT), No_ADC_Channel, PWM0_CH6, TCC0_CH6, EXTERNAL_INT_4 }, // used for AT86RF SLP_TR
127127
{ }, // PA21 not available on SAMR
@@ -204,7 +204,7 @@ const PinDescription g_APinDescription[]=
204204
{ PORTC, 19, PIO_TIMER_ALT, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // #47 PC19 == AT86_MISO sercom4.0
205205
{ PORTB, 30, PIO_TIMER_ALT, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // #48 PB30 == AT86_MOSI sercom4.2
206206
{ PORTB, 31, PIO_TIMER_ALT, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // #49 PB31 == AT86_SEL sercom4.1
207-
207+
{ PORTB, 00, PIO_TIMER, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_0 }, // #50 PB00 = AT86_IRQ
208208
} ;
209209

210210
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ;

variants/zero_radio/variant.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ extern "C"
5353
*----------------------------------------------------------------------------*/
5454

5555
// Number of pins defined in PinDescription array
56-
#define PINS_COUNT (50u)
57-
#define NUM_DIGITAL_PINS (50u)
56+
#define PINS_COUNT (51u)
57+
#define NUM_DIGITAL_PINS (51u)
5858

5959
#define NUM_ANALOG_INPUTS (8u)
6060
#define NUM_ANALOG_OUTPUTS (0u)
@@ -97,6 +97,9 @@ extern "C"
9797
#define PIN_A5 (19ul)
9898
#define PIN_A6 (8ul)
9999
#define PIN_A7 (9ul)
100+
#define PIN_A11 (25ul)
101+
#define PIN_A16 (4ul)
102+
#define PIN_A17 (3ul)
100103

101104
static const uint8_t A0 = PIN_A0 ;
102105
static const uint8_t A1 = PIN_A1 ;
@@ -106,6 +109,9 @@ static const uint8_t A4 = PIN_A4 ;
106109
static const uint8_t A5 = PIN_A5 ;
107110
static const uint8_t A6 = PIN_A6 ;
108111
static const uint8_t A7 = PIN_A7 ;
112+
static const uint8_t A11 = PIN_A11 ;
113+
static const uint8_t A16 = PIN_A16 ;
114+
static const uint8_t A17 = PIN_A17 ;
109115

110116
#define ADC_RESOLUTION 12
111117

@@ -122,7 +128,7 @@ static const uint8_t ATN = PIN_ATN;
122128
#define PIN_ATRF_MISO (47u)
123129
#define PIN_ATRF_MOSI (48u)
124130
#define PIN_ATRF_SEL (49u)
125-
131+
#define PIN_ATRF_IRQ (50u)
126132

127133
/*
128134
* Serial interfaces

0 commit comments

Comments
 (0)