Skip to content

Commit 41b037d

Browse files
committed
Merge pull request #221 from nomis52/pins
Use harmony to configure the pins
2 parents 32f4bc4 + 5d52fe4 commit 41b037d

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

boardcfg/number1/board_init.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,5 @@
2222
#include "peripheral/ports/plib_ports.h"
2323

2424
void Number1_PreAppHook() {
25-
// We need to set the necessary ports to digital mode
26-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_8,
27-
PORTS_PIN_MODE_DIGITAL); // U5 RX
28-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_9,
29-
PORTS_PIN_MODE_DIGITAL); // TX En
30-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_10,
31-
PORTS_PIN_MODE_DIGITAL); // RX En
32-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_14,
33-
PORTS_PIN_MODE_DIGITAL); // U5 TX
25+
// Nothing to do
3426
}

boardcfg/number8/board_init.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,5 @@
2222
#include "peripheral/ports/plib_ports.h"
2323

2424
void Number8_PreAppHook() {
25-
// We need to set the necessary ports to digital mode
26-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_8,
27-
PORTS_PIN_MODE_DIGITAL); // U5 RX
28-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_9,
29-
PORTS_PIN_MODE_DIGITAL); // TX En
30-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_10,
31-
PORTS_PIN_MODE_DIGITAL); // RX En
32-
PLIB_PORTS_PinModeSelect(PORTS_ID_0, PORTS_ANALOG_PIN_14,
33-
PORTS_PIN_MODE_DIGITAL); // U5 TX
25+
// Nothing to do
3426
}

firmware/src/system_config/number1/number1.mhc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ CONFIG_USE_SYS_PORTS=y
228228
CONFIG_COMPONENT_PACKAGE="QFN"
229229
CONFIG_SYS_PORTS_CN=n
230230
CONFIG_USE_SYS_PORTS_CN_INTERRUPT=n
231-
CONFIG_SYS_PORT_ADPCFG=0xffff
231+
CONFIG_SYS_PORT_ADPCFG=0xb8ff
232232
CONFIG_SYS_PORT_CNEN=0x0
233233
CONFIG_SYS_PORT_CNPU=0x0
234234
#

firmware/src/system_config/number1/system_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
9191
#define SYS_INT true
9292

9393
/*** Ports System Service Configuration ***/
94-
#define SYS_PORT_AD1PCFG ~0xffff
94+
#define SYS_PORT_AD1PCFG ~0xb8ff
9595
#define SYS_PORT_CNPUE 0x0
9696
#define SYS_PORT_CNEN 0x0
9797

firmware/src/system_config/number8/number8.mhc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ CONFIG_USE_SYS_PORTS=y
228228
CONFIG_COMPONENT_PACKAGE="QFN"
229229
CONFIG_SYS_PORTS_CN=n
230230
CONFIG_USE_SYS_PORTS_CN_INTERRUPT=n
231-
CONFIG_SYS_PORT_ADPCFG=0xffff
231+
CONFIG_SYS_PORT_ADPCFG=0xb8ff
232232
CONFIG_SYS_PORT_CNEN=0x0
233233
CONFIG_SYS_PORT_CNPU=0x0
234234
#

firmware/src/system_config/number8/system_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
9191
#define SYS_INT true
9292

9393
/*** Ports System Service Configuration ***/
94-
#define SYS_PORT_AD1PCFG ~0xffff
94+
#define SYS_PORT_AD1PCFG ~0xb8ff
9595
#define SYS_PORT_CNPUE 0x0
9696
#define SYS_PORT_CNEN 0x0
9797

0 commit comments

Comments
 (0)