Index: firmware/App/Drivers/CPLD.c =================================================================== diff -u -redbd697a40ad892873bfb67b05247fc12894f17e -re69a109cc497124ac5f438264647666b17276bf4 --- firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision edbd697a40ad892873bfb67b05247fc12894f17e) +++ firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision e69a109cc497124ac5f438264647666b17276bf4) @@ -32,9 +32,6 @@ // ********** private definitions ********** -#define CPLD_REPORT_PERIOD ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) ///< Broadcast CPLD values message every second. -#define DATA_PUBLISH_COUNTER_START_COUNT 27 ///< Data publish counter start count. - #define WD_PET_GIO_PORT_PIN 1U ///< Watchdog pet GPIO pin number. #define WD_EXP_GIO_PORT_PIN 0U ///< Watchdog expired GPIO pin number. @@ -64,10 +61,6 @@ // ********** private data ********** -static OVERRIDE_U32_T cpldDataPublishInterval = { CPLD_REPORT_PERIOD, - CPLD_REPORT_PERIOD, 0, 0 }; ///< CPLD publish time interval override. -static U32 cpldDataPublishCounter; ///< Conductivity sensors data publish timer counter. - CPLD_STATUS_T cpldStatus = { 0, 0, 0, CPLD_CLEAN_LED_OFF }; // ********** private function prototypes ********** @@ -83,8 +76,6 @@ *************************************************************************/ void initCPLD( void ) { - cpldDataPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; - // initialize watchdog pet output low (inactive) CLR_WD_PET(); @@ -236,57 +227,8 @@ *************************************************************************/ static void broadcastCPLDStatus( void ) { - if ( ++cpldDataPublishCounter >= getU32OverrideValue( &cpldDataPublishInterval ) ) - { - getCPLDStatus( &cpldStatus ); - broadcastData( MSG_ID_DG_CPLD_STATUS, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&cpldStatus, sizeof( CPLD_STATUS_T ) ); - cpldDataPublishCounter = 0; - } + getCPLDStatus( &cpldStatus ); + broadcastData( MSG_ID_DG_CPLD_STATUS, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&cpldStatus, sizeof( CPLD_STATUS_T ) ); } -/*********************************************************************//** - * @brief - * The testSetCpldDataPublishIntervalOverride function overrides - * the cpld data publish interval. - * @details Inputs: conductivityDataPublishInterval - * @details Outputs: conductivityDataPublishInterval - * @param value override cpld data publish interval with (in ms) - * @return TRUE if override successful, FALSE if not - *************************************************************************/ -BOOL testSetCpldDataPublishIntervalOverride( U32 interval_ms ) -{ - BOOL result = FALSE; - - if ( isTestingActivated() ) - { - result = TRUE; - cpldDataPublishInterval.ovData = interval_ms / TASK_PRIORITY_INTERVAL; - cpldDataPublishInterval.override = OVERRIDE_KEY; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The testResetCpldDataPublishIntervalOverride function resets - * the override of the cpld data publish interval. - * @details Inputs: conductivityDataPublishInterval - * @details Outputs: conductivityDataPublishInterval - * @return TRUE if override reset successful, FALSE if not - *************************************************************************/ -BOOL testResetCpldDataPublishIntervalOverride( void ) -{ - BOOL result = FALSE; - - if ( isTestingActivated() ) - { - result = TRUE; - cpldDataPublishInterval.ovData = cpldDataPublishInterval.ovInitData; - cpldDataPublishInterval.override = OVERRIDE_RESET; - } - - return result; -} - /**@}*/