Index: App/Drivers/CPLD.c =================================================================== diff -u -r765d2c35118e202444e737c66c77faf9678cc87e -r894b734327eb6e7cfa6bf651623576bc10214195 --- App/Drivers/CPLD.c (.../CPLD.c) (revision 765d2c35118e202444e737c66c77faf9678cc87e) +++ App/Drivers/CPLD.c (.../CPLD.c) (revision 894b734327eb6e7cfa6bf651623576bc10214195) @@ -1,18 +1,18 @@ /************************************************************************* -* -* Copyright Diality, Inc. 2019-2020. All Rights Reserved. -* 181 Technology, Ste. 150 -* Irvine, CA 92618 -* -* Project Denali -* -* @file CPLD.c -* -* @brief Monitor/Controller for the CPLD. -* -* @date 20-Sep-2019 -* -*************************************************************************/ + * + * Copyright Diality, Inc. 2019-2020. All Rights Reserved. + * 181 Technology, Ste. 150 + * Irvine, CA 92618 + * + * Project Denali + * + * @file CPLD.c + * + * @brief Monitor/Controller for the CPLD. + * + * @date 20-Sep-2019 + * + *************************************************************************/ #include "gio.h" #include "lin.h" @@ -64,24 +64,24 @@ * Outputs : CPLD module signal outputs set to initial states. * @param none * @return none -*************************************************************************/ + *************************************************************************/ void initCPLD( void ) { - // initialize watchdog pet output low (inactive) - CLR_WD_PET(); + // initialize watchdog pet output low (inactive) + CLR_WD_PET(); - // initialize power off request output low (inactive) - CLR_OFF_REQ(); + // initialize power off request output low (inactive) + CLR_OFF_REQ(); - // initialize alarm lamp color LED outputs low (off) - CLR_GREEN(); - CLR_RED(); - CLR_YELLOW(); + // initialize alarm lamp color LED outputs low (off) + CLR_GREEN(); + CLR_RED(); + CLR_YELLOW(); - // initialize the associated s/w modules - initAlarmLamp(); - initButtons(); - initWatchdogMgmt(); + // initialize the associated s/w modules + initAlarmLamp(); + initButtons(); + initWatchdogMgmt(); } /************************************************************************* @@ -93,17 +93,17 @@ * Outputs : watchdog pet signal set to given level. * @param level : LOW or HIGH * @return none -*************************************************************************/ + *************************************************************************/ void setCPLDWatchdog( PIN_SIGNAL_STATE_T level ) { - if ( level == PIN_SIGNAL_HIGH ) - { - SET_WD_PET(); - } - else - { - CLR_WD_PET(); - } + if ( level == PIN_SIGNAL_HIGH ) + { + SET_WD_PET(); + } + else + { + CLR_WD_PET(); + } } /************************************************************************* @@ -115,12 +115,12 @@ * Outputs : none * @param none * @return level : (LOW or HIGH) -*************************************************************************/ + *************************************************************************/ PIN_SIGNAL_STATE_T getCPLDWatchdogExpired( void ) { - PIN_SIGNAL_STATE_T level = GET_WD_EXP(); + PIN_SIGNAL_STATE_T level = GET_WD_EXP(); - return level; + return level; } /************************************************************************* @@ -132,17 +132,17 @@ * Outputs : alarm lamp green signal set to given level. * @param level : LOW or HIGH * @return none -*************************************************************************/ + *************************************************************************/ void setCPLDLampGreen( PIN_SIGNAL_STATE_T level ) { - if ( level == PIN_SIGNAL_HIGH ) - { - SET_GREEN(); - } - else - { - CLR_GREEN(); - } + if ( level == PIN_SIGNAL_HIGH ) + { + SET_GREEN(); + } + else + { + CLR_GREEN(); + } } /************************************************************************* @@ -154,17 +154,17 @@ * Outputs : alarm lamp yellow signal set to given level. * @param level : LOW or HIGH * @return none -*************************************************************************/ + *************************************************************************/ void setCPLDLampYellow( PIN_SIGNAL_STATE_T level ) { - if ( level == PIN_SIGNAL_HIGH ) - { - SET_YELLOW(); - } - else - { - CLR_YELLOW(); - } + if ( level == PIN_SIGNAL_HIGH ) + { + SET_YELLOW(); + } + else + { + CLR_YELLOW(); + } } /************************************************************************* @@ -176,17 +176,17 @@ * Outputs : alarm lamp red signal set to given level. * @param level : LOW or HIGH * @return none -*************************************************************************/ + *************************************************************************/ void setCPLDLampRed( PIN_SIGNAL_STATE_T level ) { - if ( level == PIN_SIGNAL_HIGH ) - { - SET_RED(); - } - else - { - CLR_RED(); - } + if ( level == PIN_SIGNAL_HIGH ) + { + SET_RED(); + } + else + { + CLR_RED(); + } } /************************************************************************* @@ -198,17 +198,17 @@ * Outputs : off request signal set to given level. * @param level : LOW or HIGH * @return none -*************************************************************************/ + *************************************************************************/ void setCPLDOffRequest( PIN_SIGNAL_STATE_T level ) { - if ( level == PIN_SIGNAL_HIGH ) - { - SET_OFF_REQ(); - } - else - { - CLR_OFF_REQ(); - } + if ( level == PIN_SIGNAL_HIGH ) + { + SET_OFF_REQ(); + } + else + { + CLR_OFF_REQ(); + } } /************************************************************************* @@ -220,12 +220,12 @@ * Outputs : none * @param none * @return level : (LOW or HIGH) -*************************************************************************/ + *************************************************************************/ PIN_SIGNAL_STATE_T getCPLDOffButton( void ) { - PIN_SIGNAL_STATE_T level = GET_OFF(); + PIN_SIGNAL_STATE_T level = GET_OFF(); - return level; + return level; } /************************************************************************* @@ -237,11 +237,11 @@ * Outputs : none * @param none * @return level : (LOW or HIGH) -*************************************************************************/ + *************************************************************************/ PIN_SIGNAL_STATE_T getCPLDStopButton( void ) { - PIN_SIGNAL_STATE_T level = GET_STOP(); + PIN_SIGNAL_STATE_T level = GET_STOP(); - return level; + return level; }