Skip to content

Commit 639b70b

Browse files
committed
Merge branch '1.0.3'
2 parents 912208c + 186ab12 commit 639b70b

File tree

8 files changed

+89
-93
lines changed

8 files changed

+89
-93
lines changed

make_package.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
cd sam
4+
5+
branch=$(git symbolic-ref --short HEAD)
6+
coreversion=$(sed -n -e '/based/I s/^.* v\(1.*\)/\1/p' < $branch/readme.txt)
7+
8+
tar jcvf ../sam-$coreversion-opentracker-$branch.tar.bz2 $branch
9+
10+
cd ..

package_opentracker_index.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
{
1313
"name": "OpenTracker Boards (32-bits ARM Cortex-M3)",
1414
"architecture": "sam",
15-
"version": "1.0.2",
15+
"version": "1.0.3",
1616
"category": "Contributed",
17-
"url": "https://github.com/geolink/opentracker-arduino-board/releases/download/v1.0.2/sam-1.6.6-opentracker-1.0.2.tar.bz2",
18-
"archiveFileName": "sam-1.6.6-opentracker-1.0.2.tar.bz2",
19-
"checksum": "SHA-256:3fd207012b704800a97289ea87c0dee1ecb096d722a4ec36ef999ab9761d24aa",
20-
"size": "2864704",
17+
"url": "https://github.com/geolink/opentracker-arduino-board/releases/download/v1.0.3/sam-1.6.6-opentracker-1.0.3.tar.bz2",
18+
"archiveFileName": "sam-1.6.6-opentracker-1.0.3.tar.bz2",
19+
"checksum": "SHA-256:c6522d614bca3f67e407347be7704a750f4aa85a2d1226278f0e3c391e87b39a",
20+
"size": "2863965",
2121
"boards": [
2222
{"name": "GeoLink OpenTracker"}
2323
],
@@ -30,7 +30,7 @@
3030
{
3131
"packager": "opentracker",
3232
"name": "bossac",
33-
"version": "1.4-opentracker"
33+
"version": "1.5-opentracker"
3434
}
3535
]
3636
},
@@ -122,35 +122,35 @@
122122
},
123123
{
124124
"name": "bossac",
125-
"version": "1.4-opentracker",
125+
"version": "1.5-opentracker",
126126
"systems": [
127127
{
128128
"host": "i686-linux-gnu",
129-
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.4-opentracker/bossac-1.4-opentracker-i686-linux-gnu.tar.bz2",
130-
"archiveFileName": "bossac-1.4-opentracker-i686-linux-gnu.tar.bz2",
131-
"checksum": "SHA-256:eea8b72a57097b9a33ae6c88114dc6736f420343b633dc388ffbd199fa8cdea5",
132-
"size": "29570"
129+
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.5-opentracker/bossac-1.5-opentracker-i686-linux-gnu.tar.gz",
130+
"archiveFileName": "bossac-1.5-opentracker-i686-linux-gnu.tar.gz",
131+
"checksum": "SHA-256:6b30e914b50aa12c15bee86c2c2e5ee9739d288babbc718956e7d67f52961cb4",
132+
"size": "29179"
133133
},
134134
{
135135
"host": "x86_64-pc-linux-gnu",
136-
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.4-opentracker/bossac-1.4-opentracker-x86_64-pc-linux-gnu.tar.bz2",
137-
"archiveFileName": "bossac-1.4-opentracker-x86_64-pc-linux-gnu.tar.bz2",
138-
"checksum": "SHA-256:f87267b2d8f2cb6782c5472609bbcd204eb3306451e2c7e5f48af7dcb2f9225c",
139-
"size": "29848"
136+
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.5-opentracker/bossac-1.5-opentracker-x86_64-pc-linux-gnu.tar.gz",
137+
"archiveFileName": "bossac-1.5-opentracker-x86_64-pc-linux-gnu.tar.gz",
138+
"checksum": "SHA-256:ffb581810e0ac37dfa37019544676b44bf3e236cb38c084d5ad23de062292c3c",
139+
"size": "29389"
140140
},
141141
{
142142
"host": "i686-mingw32",
143-
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.4-opentracker/bossac-1.4-opentracker-i686-mingw32.tar.bz2",
144-
"archiveFileName": "bossac-1.4-opentracker-i686-mingw32.tar.bz2",
145-
"checksum": "SHA-256:c197ab61cd073e2a41e9ffc608482998616fc0d8db1978e6c2e491858c8bce40",
146-
"size": "213711"
143+
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.5-opentracker/bossac-1.5-opentracker-x86_64-w64-mingw32.tar.gz",
144+
"archiveFileName": "bossac-1.5-opentracker-x86_64-w64-mingw32.tar.gz",
145+
"checksum": "SHA-256:d79120c6ac40a6e02843a5ac93e3d289b7b5a4453f2f536f5dd60e364bf11b3c",
146+
"size": "218849"
147147
},
148148
{
149149
"host": "i686-apple-darwin10",
150-
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.4-opentracker/bossac-1.4-opentracker-i686-apple-darwin10.tar.gz",
151-
"archiveFileName": "bossac-1.4-opentracker-i686-apple-darwin10.tar.gz",
152-
"checksum": "SHA-256:c15dac7cd8a31ef0c85d5b59282dca8d02d81013409a18f7e7deb83778ac367f",
153-
"size": "66743"
150+
"url": "https://github.com/geolink/opentracker-bossa/releases/download/1.5-opentracker/bossac-1.5-opentracker-i686-apple-darwin10.tar.gz",
151+
"archiveFileName": "bossac-1.5-opentracker-i686-apple-darwin10.tar.gz",
152+
"checksum": "SHA-256:2e1d97570edcc6bd57adfff9ab3572b793b8c74d0076ccba99d8cb47ca549bcc",
153+
"size": "66626"
154154
}
155155
]
156156
}

sam/1.0.3/cores/arduino/wiring_analog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void TC_SetCMR_ChannelB(Tc *tc, uint32_t chan, uint32_t v)
191191
}
192192

193193
static uint8_t PWMEnabled = 0;
194-
static uint8_t pinEnabled[PINS_COUNT];
194+
/*static*/ uint8_t pinEnabled[PINS_COUNT];
195195
static uint8_t TCChanEnabled[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
196196

197197
void analogOutputInit(void) {

sam/1.0.3/cores/arduino/wiring_digital.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
extern "C" {
2323
#endif
2424

25+
extern uint8_t pinEnabled[PINS_COUNT];
26+
2527
extern void pinMode( uint32_t ulPin, uint32_t ulMode )
2628
{
2729
if ( g_APinDescription[ulPin].ulPinType == PIO_NOT_A_PIN )
2830
{
2931
return ;
3032
}
31-
3233
switch ( ulMode )
3334
{
3435
case INPUT:
@@ -39,6 +40,7 @@ extern void pinMode( uint32_t ulPin, uint32_t ulMode )
3940
PIO_INPUT,
4041
g_APinDescription[ulPin].ulPin,
4142
0 ) ;
43+
pinEnabled[ulPin] = 0;
4244
break ;
4345

4446
case INPUT_PULLUP:
@@ -49,6 +51,7 @@ extern void pinMode( uint32_t ulPin, uint32_t ulMode )
4951
PIO_INPUT,
5052
g_APinDescription[ulPin].ulPin,
5153
PIO_PULLUP ) ;
54+
pinEnabled[ulPin] = 0;
5255
break ;
5356

5457
case OUTPUT:
@@ -57,6 +60,7 @@ extern void pinMode( uint32_t ulPin, uint32_t ulMode )
5760
PIO_OUTPUT_1,
5861
g_APinDescription[ulPin].ulPin,
5962
g_APinDescription[ulPin].ulPinConfiguration ) ;
63+
pinEnabled[ulPin] = 0;
6064

6165
/* if all pins are output, disable PIO Controller clocking, reduce power consumption */
6266
if ( g_APinDescription[ulPin].pPort->PIO_OSR == 0xffffffff )
@@ -68,6 +72,10 @@ extern void pinMode( uint32_t ulPin, uint32_t ulMode )
6872
default:
6973
break ;
7074
}
75+
if ( g_APinDescription[ulPin].ulADCChannelNumber != NO_ADC )
76+
{
77+
adc_disable_channel(ADC, g_APinDescription[ulPin].ulADCChannelNumber);
78+
}
7179
}
7280

7381
extern void digitalWrite( uint32_t ulPin, uint32_t ulVal )

sam/1.0.3/libraries/DueFlashStorage/DueFlashStorage.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ boolean DueFlashStorage::write(uint32_t address, byte *data, uint32_t dataLength
6565
_FLASH_DEBUG("Flash write address too high\n");
6666
return false;
6767
}
68-
69-
_FLASH_DEBUG("FLASH DEBUG\n");
70-
_FLASH_DEBUG(IFLASH1_ADDR);
71-
_FLASH_DEBUG("\n");
72-
_FLASH_DEBUG(IFLASH1_SIZE);
73-
_FLASH_DEBUG("\n");
74-
75-
// _FLASH_DEBUG(FLASH_START);
76-
_FLASH_DEBUG(address);
77-
_FLASH_DEBUG("\n");
78-
79-
_FLASH_DEBUG(dataLength);
80-
_FLASH_DEBUG("\n");
81-
82-
83-
8468

8569
/*
8670
if (((uint32_t)FLASH_START+address & 3) != 0) {

sam/1.0.3/platform.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

2-
# Arduino SAM Core and platform.
3-
# ------------------------------
2+
# OpenTracker SAM Core and platform.
3+
# ----------------------------------
44
#
55
# For more info:
66
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
77

8-
name=Arduino ARM (32-bits) Boards
9-
version=1.6.6
8+
name=OpenTracker ARM (32-bits) Boards
9+
version=1.0.3
10+
11+
# Derived from Arduino SAM core 1.6.6
1012

1113
# SAM3 compile variables
1214
# ----------------------
@@ -93,15 +95,15 @@ recipe.size.regex=\.text\s+([0-9]+).*
9395
# -------------------
9496

9597
# BOSSA
96-
tools.bossac.path={runtime.tools.bossac-1.4-opentracker.path}
98+
tools.bossac.path={runtime.tools.bossac-1.5-opentracker.path}
9799
tools.bossac.cmd=bossac
98100
tools.bossac.cmd.windows=bossac.exe
99101

100102
tools.bossac.upload.params.verbose=-i -d
101103
tools.bossac.upload.params.quiet=
102104
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -v -b "{build.path}/{build.project_name}.bin" -R
103105

104-
tools.bossac_secure.path={runtime.tools.bossac-1.4-opentracker.path}
106+
tools.bossac_secure.path={runtime.tools.bossac-1.5-opentracker.path}
105107
tools.bossac_secure.cmd=bossac
106108
tools.bossac_secure.cmd.windows=bossac.exe
107109

sam/1.0.3/variants/geolink_opentracker/variant.cpp

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ extern const PinDescription g_APinDescription[]=
122122
// 0 .. 53 - Digital pins
123123
// ----------------------
124124
// 0/1 - UART (Serial)
125-
{ PIOA, PIO_PA8A_URXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // URXD
126-
{ PIOA, PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // UTXD
125+
{ PIOA, PIO_PA8A_URXD, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NOT_ON_TIMER }, // URXD
126+
{ PIOA, PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH3, NOT_ON_TIMER }, // UTXD
127127

128128
// 2
129129
{ PIOB, PIO_PB25B_TIOA0, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHA0 }, // TIOA0
@@ -132,11 +132,11 @@ extern const PinDescription g_APinDescription[]=
132132
{ PIOA, PIO_PA5A_TIOA2, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHA2 }, // TIOA2
133133

134134
// 6
135-
{ PIOA, PIO_PA21B_PWML0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, PWM_CH0, NOT_ON_TIMER }, // PWML0
136-
{ PIOA, PIO_PA20B_PWML2, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, PWM_CH2, NOT_ON_TIMER }, // PWML2
135+
{ PIOA, PIO_PA21B_PWML0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH0, NOT_ON_TIMER }, // PWML0
136+
{ PIOA, PIO_PA20B_PWML2, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH2, NOT_ON_TIMER }, // PWML2
137137

138138
// 8
139-
{ PIOB, PIO_PB17, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 8 = S_INLEVEL
139+
{ PIOB, PIO_PB17, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 8 = S_INLEVEL
140140
{ PIOB, PIO_PB16, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 9 = CAN_RS
141141
{ PIOB, PIO_PB18, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 10 = C_OUT_1
142142
{ PIOB, PIO_PB19, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 11 = C_OUT_2
@@ -176,8 +176,8 @@ extern const PinDescription g_APinDescription[]=
176176
{ PIOA, PIO_PA23X1_AD5, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC2, ADC5, NOT_ON_PWM, NOT_ON_TIMER }, // AD2 = EXT_PA23
177177

178178
// 32/33 - CANRX0/CANTX0
179-
{ PIOA, PIO_PA1A_CANRX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, ADC14, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANRX
180-
{ PIOA, PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, ADC15, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANTX
179+
{ PIOA, PIO_PA1A_CANRX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANRX
180+
{ PIOA, PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANTX
181181

182182
// 34/35/36 - SPI
183183
{ PIOA, PIO_PA25A_SPI0_MISO,ID_PIOA,PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // MISO
@@ -188,8 +188,8 @@ extern const PinDescription g_APinDescription[]=
188188
{ PIOA, PIO_PA28A_SPI0_NPCS0,ID_PIOA,PIO_PERIPH_A,PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS0
189189

190190
// 38
191-
{ PIOA, PIO_PA18A_TWCK0, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 49 = C_IN1_PD
192-
{ PIOA, PIO_PA19, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 50 = C_IN2_PD
191+
{ PIOA, PIO_PA18A_TWCK0, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 49 = C_IN1_PD
192+
{ PIOA, PIO_PA19, ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 50 = C_IN2_PD
193193

194194
// 40 - End of standard pins -----
195195

@@ -203,8 +203,8 @@ extern const PinDescription g_APinDescription[]=
203203
{ PIOA, PIO_PA11A_TXD0|PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
204204
// 43 - USART1 (Serial2) all pins
205205
{ PIOA, PIO_PA13A_TXD1|PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
206-
// 44 - USART3 (Serial3) all pins
207-
{ PIOB, PIO_PB20A_TXD2|PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
206+
// 44 - USART2 (Serial3) all pins
207+
{ PIOB, PIO_PB20A_TXD2|PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
208208

209209
// 45 - USB
210210
{ PIOB, PIO_PB11A_UOTGID|PIO_PB10A_UOTGVBOF, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID - VBOF
@@ -216,7 +216,7 @@ extern const PinDescription g_APinDescription[]=
216216
{ PIOB, PIO_PB20B_SPI0_NPCS1, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS1
217217

218218
// 48 - DAC1 (alias)
219-
{ PIOB, PIO_PB16X1_DAC1, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC13, DA1, NOT_ON_PWM, NOT_ON_TIMER }, // DAC1
219+
{ PIOB, PIO_PB16X1_DAC1, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, NO_ADC, DA1, NOT_ON_PWM, NOT_ON_TIMER }, // DAC1
220220

221221
// 49 - Analog (alias)
222222
{ PIOB, PIO_PB17X1_AD10, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC8, ADC10, NOT_ON_PWM, NOT_ON_TIMER }, // AD8 = S_INLEVEL
@@ -321,23 +321,14 @@ void init( void )
321321
// Initialize C library
322322
__libc_init_array();
323323

324-
// Disable pull-up on every pin
324+
// Initialize every pin
325325
for (unsigned i = 0; i < PINS_COUNT; i++)
326326
{
327-
switch (i)
328-
{
329-
case -1: //fake
330-
#ifdef PIN_C_IN1_PD
331-
case PIN_C_IN1_PD: // 36V input range, for compatibility
332-
#endif
333-
#ifdef PIN_C_IN2_PD
334-
case PIN_C_IN2_PD: // 36V input range, for compatibility
335-
#endif
336-
digitalWrite(i, HIGH);
337-
break;
338-
default:
339-
digitalWrite(i, LOW);
340-
}
327+
PIO_Configure(
328+
g_APinDescription[i].pPort,
329+
g_APinDescription[i].ulPinType,
330+
g_APinDescription[i].ulPin,
331+
g_APinDescription[i].ulPinConfiguration);
341332
}
342333

343334
// Enable parallel access on PIO output data registers
@@ -350,7 +341,6 @@ void init( void )
350341
g_APinDescription[PINS_UART].ulPinType,
351342
g_APinDescription[PINS_UART].ulPin,
352343
g_APinDescription[PINS_UART].ulPinConfiguration);
353-
digitalWrite(0, HIGH); // Enable pullup for RX0
354344
PIO_Configure(
355345
g_APinDescription[PINS_USART0].pPort,
356346
g_APinDescription[PINS_USART0].ulPinType,

sam/1.0.3/variants/geolink_opentracker/variant.h

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,26 @@ static const uint8_t CANTX = 33;
219219
#define PIN_EXT_SDA 20
220220
#define PIN_EXT_SCL 21
221221
#define PIN_WAKE_GSM 23
222+
#define PIN_C_PWR_GSM 25
223+
#define PIN_RESET_GPS 26
224+
#define PIN_STANDBY_GPS 27
225+
#define PIN_EXT_IN1 28
226+
#define PIN_EXT_IN2 29
227+
#define PIN_EXT_PA22 30
228+
#define PIN_EXT_PA23 31
229+
#define PIN_CANRX 32
230+
#define PIN_CANTX 33
231+
#define PIN_EXT_MISO 34
232+
#define PIN_EXT_MOSI 35
233+
#define PIN_EXT_SCK 36
234+
#define PIN_EXT_NS0 37
222235
#if !defined(OPENTRACKER_HW_REV) || (OPENTRACKER_HW_REV < 0x0240)
223236
// HW Revision 2.3 (and earlier)
224237
#define PIN_C_REBOOT 4
225238
#define PIN_RING_GSM 22
226239
#define PIN_GSM_VDD_EXT 24
240+
#define ANALOG_VREF 3.40
241+
#define MODEM_VBAT 4.13
227242
#else
228243
// HW Revision 2.4
229244
// dropped "REBOOT" pin and "GSM VDD" (unused)
@@ -232,22 +247,10 @@ static const uint8_t CANTX = 33;
232247
#define PIN_RING_GSM 24
233248
#define PIN_C_IN1_PD 38
234249
#define PIN_C_IN2_PD 39
250+
#define ANALOG_VREF 3.31
251+
#define MODEM_VBAT 4.36
235252
#endif
236-
#define PIN_C_PWR_GSM 25
237-
#define PIN_RESET_GPS 26
238-
#define PIN_STANDBY_GPS 27
239-
#define PIN_EXT_IN1 28
240-
#define PIN_EXT_IN2 29
241-
#define PIN_EXT_PA22 30
242-
#define PIN_EXT_PA23 31
243-
#define PIN_CANRX 32
244-
#define PIN_CANTX 33
245-
#define PIN_EXT_MISO 34
246-
#define PIN_EXT_MOSI 35
247-
#define PIN_EXT_SCK 36
248-
#define PIN_EXT_NS0 37
249253

250-
#define ANALOG_VREF 3.4f
251254
#define AIN_S_INLEVEL 49
252255
#define AIN_EXT_IN1 28
253256
#define AIN_EXT_IN2 29
@@ -282,11 +285,10 @@ extern USARTClass Serial3;
282285
//
283286
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
284287
// pins are NOT connected to anything by default.
285-
#define SERIAL_PORT_MONITOR Serial
288+
#define SERIAL_PORT_MONITOR SerialUSB
286289
#define SERIAL_PORT_USBVIRTUAL SerialUSB
287-
#define SERIAL_PORT_HARDWARE_OPEN Serial1
288-
#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
289-
#define SERIAL_PORT_HARDWARE_OPEN2 Serial3
290+
#define SERIAL_PORT_HARDWARE_OPEN Serial
291+
#define SERIAL_PORT_HARDWARE_OPEN1 Serial3
290292
#define SERIAL_PORT_HARDWARE Serial
291293
#define SERIAL_PORT_HARDWARE1 Serial1
292294
#define SERIAL_PORT_HARDWARE2 Serial2

0 commit comments

Comments
 (0)