Skip to content

Commit 5728b36

Browse files
committed
Fix UART2 pins not matching labels
1 parent 6913f50 commit 5728b36

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/registers/system/pin_manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ void PIN_MANAGER_Initialize(void) {
125125
***************************************************************************/
126126
RPOR2bits.RP39R = RPN_U1TX_PORT; //RB7->UART1:U1TX
127127
RPINR18bits.U1RXR = RPI_RP40; //RB8->UART1:U1RX
128-
RPOR2bits.RP38R = RPN_U2TX_PORT; // RB6->UART2:U2TX
129-
RPINR19bits.U2RXR = RPI_RP37; // RB5->UART2:U2RX
128+
RPOR1bits.RP37R = RPN_U2TX_PORT; // RB5->UART2:U2TX
129+
RPINR19bits.U2RXR = RPI_RP38; // RB6->UART2:U2RX
130130

131131
LED_SetHigh();
132132
}

src/registers/system/pin_manager.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,19 @@
107107
#define UART1_TX_SetDigitalInput() (_TRISB7 = 1)
108108
#define UART1_TX_SetDigitalOutput() (_TRISB7 = 0)
109109

110-
#define UART2_RX_SetHigh() (_LATB5 = 1)
111-
#define UART2_RX_SetLow() (_LATB5 = 0)
112-
#define UART2_RX_Toggle() (_LATB5 ^= 1)
113-
#define UART2_RX_GetValue() _RB5
114-
#define UART2_RX_SetDigitalInput() (_TRISB5 = 1)
115-
#define UART2_RX_SetDigitalOutput() (_TRISB5 = 0)
116-
117-
#define UART2_TX_SetHigh() (_LATB6 = 1)
118-
#define UART2_TX_SetLow() (_LATB6 = 0)
119-
#define UART2_TX_Toggle() (_LATB6 ^= 1)
120-
#define UART2_TX_GetValue() _RB6
121-
#define UART2_TX_SetDigitalInput() (_TRISB6 = 1)
122-
#define UART2_TX_SetDigitalOutput() (_TRISB6 = 0)
110+
#define UART2_RX_SetHigh() (_LATB6 = 1)
111+
#define UART2_RX_SetLow() (_LATB6 = 0)
112+
#define UART2_RX_Toggle() (_LATB6 ^= 1)
113+
#define UART2_RX_GetValue() _RB6
114+
#define UART2_RX_SetDigitalInput() (_TRISB6 = 1)
115+
#define UART2_RX_SetDigitalOutput() (_TRISB6 = 0)
116+
117+
#define UART2_TX_SetHigh() (_LATB5 = 1)
118+
#define UART2_TX_SetLow() (_LATB5 = 0)
119+
#define UART2_TX_Toggle() (_LATB5 ^= 1)
120+
#define UART2_TX_GetValue() _RB5
121+
#define UART2_TX_SetDigitalInput() (_TRISB5 = 1)
122+
#define UART2_TX_SetDigitalOutput() (_TRISB5 = 0)
123123

124124
/*******************************************************************************
125125
* Oscilloscope

0 commit comments

Comments
 (0)