Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UART2 pins not matching labels #178

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/registers/system/pin_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void PIN_MANAGER_Initialize(void) {
***************************************************************************/
RPOR2bits.RP39R = RPN_U1TX_PORT; //RB7->UART1:U1TX
RPINR18bits.U1RXR = RPI_RP40; //RB8->UART1:U1RX
RPOR2bits.RP38R = RPN_U2TX_PORT; // RB6->UART2:U2TX
RPINR19bits.U2RXR = RPI_RP37; // RB5->UART2:U2RX
RPOR1bits.RP37R = RPN_U2TX_PORT; // RB5->UART2:U2TX
RPINR19bits.U2RXR = RPI_RP38; // RB6->UART2:U2RX

LED_SetHigh();
}
Expand Down
26 changes: 13 additions & 13 deletions src/registers/system/pin_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@
#define UART1_TX_SetDigitalInput() (_TRISB7 = 1)
#define UART1_TX_SetDigitalOutput() (_TRISB7 = 0)

#define UART2_RX_SetHigh() (_LATB5 = 1)
#define UART2_RX_SetLow() (_LATB5 = 0)
#define UART2_RX_Toggle() (_LATB5 ^= 1)
#define UART2_RX_GetValue() _RB5
#define UART2_RX_SetDigitalInput() (_TRISB5 = 1)
#define UART2_RX_SetDigitalOutput() (_TRISB5 = 0)

#define UART2_TX_SetHigh() (_LATB6 = 1)
#define UART2_TX_SetLow() (_LATB6 = 0)
#define UART2_TX_Toggle() (_LATB6 ^= 1)
#define UART2_TX_GetValue() _RB6
#define UART2_TX_SetDigitalInput() (_TRISB6 = 1)
#define UART2_TX_SetDigitalOutput() (_TRISB6 = 0)
#define UART2_RX_SetHigh() (_LATB6 = 1)
#define UART2_RX_SetLow() (_LATB6 = 0)
#define UART2_RX_Toggle() (_LATB6 ^= 1)
#define UART2_RX_GetValue() _RB6
#define UART2_RX_SetDigitalInput() (_TRISB6 = 1)
#define UART2_RX_SetDigitalOutput() (_TRISB6 = 0)

#define UART2_TX_SetHigh() (_LATB5 = 1)
#define UART2_TX_SetLow() (_LATB5 = 0)
#define UART2_TX_Toggle() (_LATB5 ^= 1)
#define UART2_TX_GetValue() _RB5
#define UART2_TX_SetDigitalInput() (_TRISB5 = 1)
#define UART2_TX_SetDigitalOutput() (_TRISB5 = 0)

/*******************************************************************************
* Oscilloscope
Expand Down
Loading