| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /**
- * @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 -
- * <a href="https://mengze.top/MZ-ATY_VCJS">
- * https://mengze.top/MZ-ATY_VCJS</a>
- * - CC 4.0 BY-NC-SA -
- * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
- * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
- * - 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 *********************************/
|