Logo
TIDM-CAPTIVATE-THERMOSTAT-UI Example Application Guide  v1.00.00.00
Thermostat_UI_LEDs

Defines & macros specific to LED control for the thermostat application. More...

Macros

#define UP_LED_POUT   (P2OUT)
 Defines the PxOUT register associated with the UP LED.
 
#define UP_LED_PDIR   (P2DIR)
 Defines the PxDIR register associated with the UP LED.
 
#define UP_LED_PIN   (BIT0)
 Defines the pin that controls the UP LED.
 
#define UP_LED_ON   (UP_LED_POUT &= ~UP_LED_PIN)
 Macro for turning the UP LED on.
 
#define UP_LED_OFF   (UP_LED_POUT |= UP_LED_PIN)
 Macro for turning the UP LED off.
 
#define UP_LED_TOGGLE   (UP_LED_POUT ^= UP_LED_PIN)
 Macro for toggling the UP LED state.
 
#define DOWN_LED_POUT   (P2OUT)
 Defines the PxOUT register associated with the DOWN LED.
 
#define DOWN_LED_PDIR   (P2DIR)
 Defines the PxDIR register associated with the DOWN LED.
 
#define DOWN_LED_PIN   (BIT1)
 Defines the pin that controls the DOWN LED.
 
#define DOWN_LED_ON   (DOWN_LED_POUT &= ~DOWN_LED_PIN)
 Macro for turning the DOWN LED on.
 
#define DOWN_LED_OFF   (DOWN_LED_POUT |= DOWN_LED_PIN)
 Macro for turning the DOWN LED off.
 
#define DOWN_LED_TOGGLE   (DOWN_LED_POUT ^= DOWN_LED_PIN)
 Macro for toggling the DOWN LED state.
 
#define SET_LED_POUT   (P2OUT)
 Defines the PxOUT register associated with the SET LED.
 
#define SET_LED_PDIR   (P2DIR)
 Defines the PxDIR register associated with the SET LED.
 
#define SET_LED_PIN   (BIT6)
 Defines the pin that controls the SET LED.
 
#define SET_LED_ON   (SET_LED_POUT &= ~SET_LED_PIN)
 Macro for turning the SET LED on.
 
#define SET_LED_OFF   (SET_LED_POUT |= SET_LED_PIN)
 Macro for turning the SET LED off.
 
#define SET_LED_TOGGLE   (SET_LED_POUT ^= SET_LED_PIN)
 Macro for toggling the SET LED state.
 
#define HOLD_LED_POUT   (P1OUT)
 Defines the PxOUT register associated with the HOLD LED.
 
#define HOLD_LED_PDIR   (P1DIR)
 Defines the PxDIR register associated with the HOLD LED.
 
#define HOLD_LED_PIN   (BIT0)
 Defines the pin that controls the HOLD LED.
 
#define HOLD_LED_ON   (HOLD_LED_POUT &= ~HOLD_LED_PIN)
 Macro for turning the HOLD LED on.
 
#define HOLD_LED_OFF   (HOLD_LED_POUT |= HOLD_LED_PIN)
 Macro for turning the HOLD LED off.
 
#define HOLD_LED_TOGGLE   (HOLD_LED_POUT ^= HOLD_LED_PIN)
 Macro for toggling the HOLD LED state.
 
#define FANAUTO_LED_POUT   (P2OUT)
 Defines the PxOUT register associated with the FAN Auto LED.
 
#define FANAUTO_LED_PDIR   (P2DIR)
 Defines the PxDIR register associated with the FAN Auto LED.
 
#define FANAUTO_LED_PIN   (BIT5)
 Defines the pin that controls the FAN Auto LED.
 
#define FANAUTO_LED_ON   (FANAUTO_LED_POUT &= ~FANAUTO_LED_PIN)
 Macro for turning the FAN Auto LED on.
 
#define FANAUTO_LED_OFF   (FANAUTO_LED_POUT |= FANAUTO_LED_PIN)
 Macro for turning the FAN Auto LED off.
 
#define FANAUTO_LED_TOGGLE   (FANAUTO_LED_POUT ^= FANAUTO_LED_PIN)
 Macro for toggling the FAN Auto LED state.
 
#define FANON_LED_POUT   (P1OUT)
 Defines the PxOUT register associated with the FAN On LED.
 
#define FANON_LED_PDIR   (P1DIR)
 Defines the PxDIR register associated with the FAN On LED.
 
#define FANON_LED_PIN   (BIT7)
 Defines the pin that controls the FAN On LED.
 
#define FANON_LED_ON   (FANON_LED_POUT &= ~FANON_LED_PIN)
 Macro for turning the FAN On LED on.
 
#define FANON_LED_OFF   (FANON_LED_POUT |= FANON_LED_PIN)
 Macro for turning the FAN On LED off.
 
#define FANON_LED_TOGGLE   (FANON_LED_POUT ^= FANON_LED_PIN)
 Macro for toggling the FAN On LED state.
 
#define HEAT_LED_POUT   (P2OUT)
 Defines the PxOUT register associated with the HEAT LED.
 
#define HEAT_LED_PDIR   (P2DIR)
 Defines the PxDIR register associated with the HEAT LED.
 
#define HEAT_LED_PIN   (BIT4)
 Defines the pint that controls the HEAT LED.
 
#define HEAT_LED_ON   (HEAT_LED_POUT &= ~HEAT_LED_PIN)
 Macro for turning the HEAT LED on.
 
#define HEAT_LED_OFF   (HEAT_LED_POUT |= HEAT_LED_PIN)
 Macro for turning the HEAT LED off.
 
#define HEAT_LED_TOGGLE   (HEAT_LED_POUT ^= HEAT_LED_PIN)
 Macro for toggling the HEAT LED state.
 
#define COOL_LED_POUT   (P1OUT)
 Defines the PxOUT register associated with the COOL LED.
 
#define COOL_LED_PDIR   (P1DIR)
 Defines the PxDIR register associated with the COOL LED.
 
#define COOL_LED_PIN   (BIT6)
 Defines the pin that controls the COOL LED.
 
#define COOL_LED_ON   (COOL_LED_POUT &= ~COOL_LED_PIN)
 Macro for turning the COOL LED on.
 
#define COOL_LED_OFF   (COOL_LED_POUT |= COOL_LED_PIN)
 Macro for turning the COOL LED off.
 
#define COOL_LED_TOGGLE   (COOL_LED_POUT ^= COOL_LED_PIN)
 Macro for toggling the COOL LED state.
 

Functions

void LEDs_updateStatus (FanState fanState, UnitState unitState, bool hold)
 Updates the state of the button LEDs to match the thermostat state. More...
 

Detailed Description

Defines & macros specific to LED control for the thermostat application.

Author
: a0273983, Created on: Aug 3, 2015
: a0224638, Revised on: Sept 8, 2015

Function Documentation

void LEDs_updateStatus ( FanState  fanState,
UnitState  unitState,
bool  hold 
)

Updates the state of the button LEDs to match the thermostat state.

Parameters
fanStateState of the fan VALID VALUES: FanOn, FanOff, FanAuto
unitStateState of the heating/cooling unit VALID VALUES: UnitsOff, Heat, Cool
holdThe hold state