Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 233 → Rev 234

/PIC Stuff/Cerebot_32MX7_LED_Cube/UART1.c
38,9 → 38,6
IEC0SET = 0x0C000000; // Enable the RX and Error interrupts
 
INTEnableInterrupts();
 
TRISDbits.TRISD14 = 0;
PORTDbits.RD14 = 0;
}
 
uint8_t UART1_Write(uint8_t *string, uint32_t length) {
61,7 → 58,6
}
 
void __ISR(_UART_1_VECTOR, ipl2) __UART_1_Interrupt_Handler(void) {
PORTDbits.RD14 = 1;
// Process UART1 error flag
if (IFS0bits.U1EIF) {
if (U1STAbits.PERR) { // Process parity error
106,5 → 102,4
}
IFS0CLR = 0x10000000; // Clear the transmit flag
}
PORTDbits.RD14 = 0;
}