/* Gets current pin mux configuration of specified pin. */
unsigned long PinModeGet(unsigned long ulPin)
/* Gets current pin mux configuration of specified pin. */
unsigned long PinModeGet(unsigned long ulPin)
{
  unsigned long ulPad;
  ulPad = g_ulPinToPadMap[ulPin & 0x3F];
  ulPad = ((ulPad << 2) + PAD_CONFIG_BASE) ;
  return (HWREG(ulPad) & PAD_MODE_MASK);
}