Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rd8fa48ead3336b1fe090b42030a8648264831076 -r632bbd302a9ae48df66e40a6faadc3db0c164671 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision d8fa48ead3336b1fe090b42030a8648264831076) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 632bbd302a9ae48df66e40a6faadc3db0c164671) @@ -99,6 +99,8 @@ #define FPGA_PBO_TEMP_OFFSET 50.0 ///< Used in conversion of PBo temperature reading to deg C. #define FPGA_ALARM_AUDIO_VOLUME_SHIFT 3 ///< Shift alarm audio volume 3 bits to left before writing to register. +#define FRONT_DOOR_SWITCH_MASK 0x0010 ///< Front door switch bit mask. +#define FPGA_POWER_STATUS_MASK 0x0400 ///< FPGA power status bit mask. // FPGA Sensors Record #pragma pack(push,1) @@ -2294,16 +2296,29 @@ /*********************************************************************//** * @brief - * The getFPGAGPIOCount function reads the FPGA GPIO count. + * The getFPGAFrontDoorStatus function returns the FPGA front door status + * bit. * @details Inputs: none * @details Outputs: fpgaSensorReadings - * @return The current FPGA GPIO count + * @return front door FPGA status bit *************************************************************************/ -U16 getFPGAGPIOCount( void ) +U16 getFPGAFrontDoorStatus( void ) { - return fpgaSensorReadings.fpgaGPIO; + return ( fpgaSensorReadings.fpgaGPIO & FRONT_DOOR_SWITCH_MASK ); } +/*********************************************************************//** + * @brief + * The getFPGAPowerStatus function returns the FPGA power status bit. + * @details Inputs: none + * @details Outputs: fpgaSensorReadings + * @return FPGA power status bit + *************************************************************************/ +U16 getFPGAPowerStatus( void ) +{ + return ( fpgaSensorReadings.fpgaGPIO & FPGA_POWER_STATUS_MASK ); +} + #ifdef DEBUG_ENABLED /*********************************************************************//** * @brief