Permalink
Browse files

Updated PPS support by backing out my changes - turns out there were …

…already public API functions that I just didn't see.
  • Loading branch information...
1 parent 365d876 commit a598a118726a68506da2164fa581d8cedb73a29e @EmbeddedMan committed Sep 15, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −4 hardware/pic32/cores/pic32/HardwareSerial.cpp
  2. +0 −2 hardware/pic32/cores/pic32/pins_arduino.h
@@ -181,15 +181,13 @@ void HardwareSerial::begin(unsigned long baudRate)
flush();
#if defined(__PIC32MX1XX__) || defined(__PIC32MX2XX__)
- volatile uint32_t * pps;
-
/* Map the UART TX to the appropriate pin.
*/
- ppsSwitchOutputPin(pinTx, ppsTx);
+ mapPpsOutput(pinTx, ppsTx);
/* Map the UART RX to the appropriate pin.
*/
- ppsSwitchInputPin(pinRx, ppsRx);
+ mapPpsInput(pinRx, ppsRx);
#endif
/* Compute the address of the interrupt priority control
@@ -172,8 +172,6 @@
#define ppsSetFromPin(P) ((digital_pin_to_pps_in_PGM[P] >> 4) & 0x000F)
#define ppsSetFromFunc(F) (((F) >> 8) & 0x000F)
#define ppsInputFromFunc(F) ((F) & 0x00FF)
-#define ppsSwitchOutputPin(Pin, Peripheral) *(ppsOutputRegister(Pin)) = ppsOutputSelect(Peripheral)
-#define ppsSwitchInputPin(Pin, Peripheral) *(ppsInputRegister(Peripheral)) = ppsInputSelect(Pin)
#define timerOCtoDigitalPin(P) (uint8_t)(output_compare_to_digital_pin_PGM[P])

0 comments on commit a598a11

Please sign in to comment.