/** * @file PWR_BTN_ATY.h * * @param Project DEVICE_GENERAL_ATY_LIB * * @author ATY * * @copyright * - Copyright 2017 - 2026 MZ-ATY * - This code follows: * - MZ-ATY Various Contents Joint Statement - * * https://mengze.top/MZ-ATY_VCJS * - CC 4.0 BY-NC-SA - * * https://creativecommons.org/licenses/by-nc-sa/4.0/ * - Your use will be deemed to have accepted the terms of this statement. * * @brief functions of power button for C platform * * @version * - 1_01_251118 > ATY * -# Preliminary version, first Release ******************************************************************************** */ #ifndef __PWR_BTN_ATY_H #define __PWR_BTN_ATY_H #include "INCLUDE_ATY.h" /******************************* For user *************************************/ /******************************************************************************/ struct PWR_BTN_ATY_Dev{ uint32_t PWR_BTN_LongPressCountMax; uint32_t PWR_BTN_LongPressCount; void (*ioSet)(uint8_t level); uint8_t (*ioGet)(void); void (*powerOffCallback)(void); uint8_t lock; }; uint8_t PWR_BTN_Status_withIT(struct PWR_BTN_ATY_Dev* dev); uint8_t PWR_BTN_Status_withCycle(struct PWR_BTN_ATY_Dev* dev); uint8_t PWR_BTN_On(struct PWR_BTN_ATY_Dev* dev); uint8_t PWR_BTN_Off(struct PWR_BTN_ATY_Dev* dev); #endif /* __PWR_BTN_ATY_H */ /******************************** End Of File *********************************/