/** * @file LED_ATY.h * * @param Project DEVICE_GENERAL_ATY_LIB * * @author ATY * * @copyright * - Copyright 2017 - 2025 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 LED for all embedded device * * @version * - 1_01_220901 > ATY * -# Preliminary version, first Release ******************************************************************************** */ #ifndef __LED_ATY_H #define __LED_ATY_H #include "INCLUDE_ATY.h" /******************************* For user *************************************/ // todo: add in struct // for breath // ms when cycle is 1ms // 3000 at 1ms cycle, 60000 at 24MHz main while cycle // #define FLOW_CYCLE_COUNT ((uint32_t)60000) // #define FLOW_CYCLE_COUNT (3000) // led brghtness split // 10 at 1ms cycle, 1000 at 24MHz main while cycle // #define ONE_PULSE_COUNT (60) // #define ONE_PULSE_COUNT (10) /******************************************************************************/ struct LED_ATY_Dev { uint32_t ledBlinkStep; uint8_t ledBlinkType; void (*ioSet)(uint8_t level); uint8_t longSteps; uint32_t flowCycleCount; // optional uint8_t onePulseCount; // optional uint8_t lock; uint8_t debugEnable; void (*LOG)(const char*, ...); }; uint8_t SysLedBlink(struct LED_ATY_Dev *dev); #endif /* __LED_ATY_H */ /******************************** End Of File *********************************/