#include "core/config.h" #if CONFIG_AUTOMAT_MODE && ( CONFIG_KEYSW || CONFIG_NFMBASECLASS ) #ifndef AUTOMAT_H #define AUTOMAT_H #include #include #include "drivers/keycontrol/keycontrol.h" // KEYCONTROL_STATE_SHORTALL KEYCONTROL_STATE_OPENALL KEYCONTROL_STATE_LOADALL typedef struct { // .Init() // Initializes the FSM "ACM Automat" // @ticks_per_1ms - number of ticks ( .Tick() calls ) per one millisecond // Returns boolean flag: true in case of success, false otherwise. // Function returns 'false' in case the "ACM Automat" is disabled in settings (Flash-memory) bool ( * Init)(uint32_t ticks_per_1ms); // Init: TASK ONLY! // .Tick() // implements the 1ms tick events for FSM "ACM Automat" void ( * Tick)(void); // Tick: IRQ ONLY! // .TemperatureUpdate() // update current device temperature for FSM "ACM Automat". // @avgtemp_degree - current temperature in degrees Celsius, integer value. // @isValueReady - true if the temperature value is ready to be used void ( * TemperatureUpdate)( int8_t avgtemp_degree, bool isValueReady ); // .DeInit() // Deinitialize the FSM "ACM Automat" void ( * DeInit)(void); // Init: TASK ONLY! } sNFMAutomatHandle_t; extern const sNFMAutomatHandle_t NFMAutomatHandle; #endif #endif