PIC32 System clock  Peripheral clock
Yes, a better way of defining peripheral clock would be:

#define GetSystemClock()            (80000000ul)
#define GetInstructionClock()       (GetSystemClock())
#define GetPeripheralClock()        (GetSystemClock()/(1&lt;&lt;OSCCONbits.PBDIV))