Index: firmware/App/Drivers/CPLD.c =================================================================== diff -u -rc67def50892f9a7c2f1f22985b5351465a8f6773 -r30f049651877229042e3f8700c8596e5b9a1e0f4 --- firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision c67def50892f9a7c2f1f22985b5351465a8f6773) +++ firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision 30f049651877229042e3f8700c8596e5b9a1e0f4) @@ -63,30 +63,6 @@ #define CLR_BLUE() {mibspiREG5->PC3 &= ~BLUE_SPI5_PORT_MASK;} ///< Macro to set blue alarm lamp signal state low. #define CLR_RED() {mibspiREG5->PC3 &= ~RED_SPI5_PORT_MASK;} ///< Macro to set red alarm lamp signal state low. -#ifdef RM46_EVAL_BOARD_TARGET - // for RM46 eval board, user button B uses the MIBSPI1_nCS[4] pin, so need to re-purpose that pin as GPIO to see the button - #define USER_BUTTON_MASK 0x00000010 // (nCS[4] - #define GET_USER_BUTTON() (PIN_SIGNAL_STATE_T)(((mibspiREG1->PC2 & USER_BUTTON_MASK) == 0 ? PIN_SIGNAL_LOW : PIN_SIGNAL_HIGH)) - PIN_SIGNAL_STATE_T getUserButtonState( void ) - { - PIN_SIGNAL_STATE_T result = GET_USER_BUTTON(); - - return result; - } - // for RM46 eval board, user LED A uses the same GPIO pin that CPLD uses for watchdog pet. Had to disable watchdog pet to use as LED. - void setUserLED( BOOL on ) - { - if ( on == TRUE ) - { - SET_WD_PET(); - } - else - { - CLR_WD_PET(); - } - } -#endif - /*********************************************************************//** * @brief * The initCPLD function initializes the CPLD module. All outputs to CPLD @@ -97,13 +73,13 @@ *************************************************************************/ void initCPLD( void ) { - // initialize watchdog pet output low (inactive) + // Initialize watchdog pet output low (inactive) CLR_WD_PET(); - // initialize power off request output low (inactive) + // Initialize power off request output low (inactive) CLR_OFF_REQ(); - // initialize alarm lamp color LED outputs low (off) + // Initialize alarm lamp color LED outputs low (off) CLR_GREEN(); CLR_RED(); CLR_BLUE(); @@ -226,11 +202,6 @@ { PIN_SIGNAL_STATE_T level = GET_OFF(); -#ifdef RM46_EVAL_BOARD_TARGET - // temporary test code for eval board - buttons have opposite polarity - level = GET_TOGGLE( level, PIN_SIGNAL_LOW, PIN_SIGNAL_LOW ); -#endif - return level; } @@ -246,11 +217,6 @@ { PIN_SIGNAL_STATE_T level = GET_STOP(); -#ifdef RM46_EVAL_BOARD_TARGET - // temporary test code for eval board - buttons have opposite polarity - level = GET_TOGGLE( level, PIN_SIGNAL_LOW, PIN_SIGNAL_LOW ); -#endif - return level; }