8#ifndef ONOFFCONTROLS_H_ 
    9#define ONOFFCONTROLS_H_ 
   14#define ONOFFBUTTON_MCP23S08_PIN_PS     5        
   15#define ONOFFBUTTON_MCP23S08_PIN_DDS1   3        
   16#define ONOFFBUTTON_MCP23S08_PIN_DDS2   1        
   17#define ONOFFBUTTON_MCP23S08_PIN_MASK   ((1<<ONOFFBUTTON_MCP23S08_PIN_PS) | (1<<ONOFFBUTTON_MCP23S08_PIN_DDS1) | (1<<ONOFFBUTTON_MCP23S08_PIN_DDS2))                 
   20#define ONOFFLED_MCP23S08_PIN_PS        4        
   21#define ONOFFLED_MCP23S08_PIN_PS_ERROR  6        
   22#define ONOFFLED_MCP23S08_PIN_DDS1      2        
   23#define ONOFFLED_MCP23S08_PIN_DDS2      0        
void OnOffControls_UpdatePSLeds()
Update the PS and PS error LEDs depending on the output enabled and protection states of the PS chann...
Definition OnOffControls.cpp:122
 
OnOffLEDs
Enumeration with all available on/off LEDs.
Definition OnOffControls.h:40
 
@ ONOFFLED_PS_ERROR
on/off LED for the PS channel error
Definition OnOffControls.h:42
 
@ ONOFFLED_PS
on/off LED for the PS channel
Definition OnOffControls.h:41
 
@ ONOFFLED_DDS1
on/off LED for the DDS1 channel
Definition OnOffControls.h:43
 
@ ONOFFLED_DDS2
on/off LED for the DDS2 channel
Definition OnOffControls.h:44
 
void OnOffControls_DoButtonAction(OnOffButtons_t button)
Do some action depending on the pressed on/off button.
Definition OnOffControls.cpp:71
 
OnOffButtons_t OnOffControls_GetButton()
Get the last pressed on/off button.
Definition OnOffControls.cpp:39
 
enum OnOffLEDs OnOffLEDs_t
Enumeration with all available on/off LEDs.
 
void OnOffControls_Init()
Initialize the IO expander used to access the on/off controls.
Definition OnOffControls.cpp:13
 
OnOffButtons
Enumeration with all available on/off buttons.
Definition OnOffControls.h:29
 
@ ONOFFBUTTON_DDS2
on/off button for the DDS2 channel
Definition OnOffControls.h:33
 
@ ONOFFBUTTON_NONE
no on/off button is pressed
Definition OnOffControls.h:30
 
@ ONOFFBUTTON_PS
on/off button for the PS channel
Definition OnOffControls.h:31
 
@ ONOFFBUTTON_DDS1
on/off button for the DDS1 channel
Definition OnOffControls.h:32
 
void OnOffControls_SetLEDState(OnOffLEDs_t led, bool state)
Set the state of the on/off LED.
Definition OnOffControls.cpp:101
 
bool OnOffControls_IsButtonChanged()
Check if the state of any on/off button has changed (was pressed or was released).
Definition OnOffControls.cpp:33
 
enum OnOffButtons OnOffButtons_t
Enumeration with all available on/off buttons.
 
Containing defines and functions for basic pin initialization and handling.