/******************************************************************** * PIC32 Peripheral Remappage ******************************************************************** */ void io_setRemap() { system_unlock(); CFGCONbits.IOLOCK=0; // unlock configuration CFGCONbits.PMDLOCK=0; { U1RXRbits.U1RXR=2; // Define U1RX as RA4 ( UEXT SERIAL ) RPB4Rbits.RPB4R=1; // Define U1TX as RB4 ( UEXT SERIAL ) } RPB13R=0x04; // PB13=SDO2 TRISBCLR=1<<13; // PB13 output. TRISBSET=1<<8; // PB8 input. TRISBSET=1<<9; // PB9 input. CFGCONbits.IOLOCK=1; // relock configuration CFGCONbits.PMDLOCK=1; system_lock(); }
void handle_unlock_watch() { system_unlock(); }