| 
    upm
    1.3.0
    
   Sensor/Actuator repository for libmraa (v1.7.0) 
   | 
 

Go to the source code of this file.
Data Structures | |
| struct | _relay_context | 
Functions | |
| relay_context | relay_init (int pin) | 
| void | relay_close (relay_context dev) | 
| upm_result_t | relay_on (relay_context dev) | 
| upm_result_t | relay_off (relay_context dev) | 
| bool | relay_is_on (relay_context dev) | 
| bool | relay_is_off (relay_context dev) | 
Typedefs | |
| typedef struct _relay_context * | relay_context | 
| relay_context relay_init | ( | int | pin | ) | 
relay init function
| pin | Pin to use | 
| void relay_close | ( | relay_context | dev | ) | 
relay destructor
| upm_result_t relay_on | ( | relay_context | dev | ) | 
Sets the relay switch to on (closed circuit). This allows current to flow and lights up the indicator LED.
| upm_result_t relay_off | ( | relay_context | dev | ) | 
Sets the relay switch to off (open circuit). This stops current from flowing and the indicator LED is not lit.
| bool relay_is_on | ( | relay_context | dev | ) | 
Checks whether the relay switch is closed.
| bool relay_is_off | ( | relay_context | dev | ) | 
Checks whether the relay switch is open.
| typedef struct _relay_context * relay_context | 
device context
 1.8.6