// // Created by xemon on 15.12.22. // #ifndef UVEOS_ON_NATION_CONTROLLABLESWITCH_H #define UVEOS_ON_NATION_CONTROLLABLESWITCH_H #include "stdbool.h" #include "stdint.h" typedef struct { bool hasCurrentState; uint32_t currentState; bool hasSoftTarget; uint32_t softTarget; bool hasHardTarget; uint32_t hardTarget; void *env; uint32_t (*invalidator)(void *env, uint32_t currentState, bool targetState); } tControllableSwitch; void ControllableSwitch_Init( tControllableSwitch *env, void *invalidatorEnv, void *invalidator ); void ControllableSwitch_Set(tControllableSwitch *env, bool value); void ControllableSwitch_SetHard(tControllableSwitch *env, int32_t value); void ControllableSwitch_ClearHard(tControllableSwitch *env); #endif //UVEOS_ON_NATION_CONTROLLABLESWITCH_H