Program Listing for File Relay8Module.h

Return to documentation for file (doc/include/Relay8Module.h)

#ifndef RELAY_MODULE_H_
#define RELAY_MODULE_H_

#include <stdint.h>

#include "EmodRet.hpp"

#ifdef __cplusplus
extern "C" {
#endif

#define Relay8Module_RELAY1 0x01
#define Relay8Module_RELAY2 0x02
#define Relay8Module_RELAY3 0x04
#define Relay8Module_RELAY4 0x08
#define Relay8Module_RELAY5 0x10
#define Relay8Module_RELAY6 0x20
#define Relay8Module_RELAY7 0x40
#define Relay8Module_RELAY8 0x80
#define Relay8Module_ALL_RELAY 0xff
#define Relay8Module_NUMBER_OF_RELAYS 8

struct Relay8ModuleStruct;
typedef struct Relay8ModuleStruct Relay8Module_t;

Relay8Module_t* Relay8Module_create();
void Relay8Module_destroy(Relay8Module_t* module);

EmodRet Relay8Module_init(Relay8Module_t* module);
EmodRet Relay8Module_init_v(Relay8Module_t* module, uint8_t variant);
EmodRet Relay8Module_configPulseWidth(Relay8Module_t* module, const uint8_t relay_mask, const uint32_t width_ms);
EmodRet Relay8Module_configAllPulseWidth(Relay8Module_t* module, const uint32_t width_ms);
EmodRet Relay8Module_activate(Relay8Module_t* module, const uint8_t relay_mask);
EmodRet Relay8Module_deactivate(Relay8Module_t* module, const uint8_t relay_mask);
EmodRet Relay8Module_activateAll(Relay8Module_t* module);
EmodRet Relay8Module_deactivateAll(Relay8Module_t* module);
EmodRet Relay8Module_getRelayStatus(Relay8Module_t* module, const uint8_t relay_mask, uint8_t* status);
EmodRet Relay8Module_getAllRelayStatus(Relay8Module_t* module, uint8_t* status);

#ifdef __cplusplus
}
#endif

#endif  // RELAY_MODULE_H_