Skip to content

Commit 32f4bc4

Browse files
committed
Merge pull request #220 from OpenLightingProject/revert-219-pins
Revert "Use harmony to configure the i/o pins"
2 parents 863bbab + 0b22f59 commit 32f4bc4

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

boardcfg/number1/board_init.c

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

2424
void Number1_PreAppHook() {
25-
// Nothing to do
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
2634
}

boardcfg/number8/board_init.c

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

2424
void Number8_PreAppHook() {
25-
// Nothing to do
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
2634
}

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=0xb8ff
231+
CONFIG_SYS_PORT_ADPCFG=0xffff
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 ~0xb8ff
94+
#define SYS_PORT_AD1PCFG ~0xffff
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=0xb8ff
231+
CONFIG_SYS_PORT_ADPCFG=0xffff
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 ~0xb8ff
94+
#define SYS_PORT_AD1PCFG ~0xffff
9595
#define SYS_PORT_CNPUE 0x0
9696
#define SYS_PORT_CNEN 0x0
9797

0 commit comments

Comments
 (0)