/******************************************************************************* * @file power_control.h * @author CandyPops Co. * @version V1.0.0 * @date 2022-09-05 * @brief ******************************************************************************* * * [헤더 개요] * 디바이스 전원 시퀀스 관리 모듈의 공용 인터페이스 헤더. * * [주요 함수 요약] * device_activated() : 전원 켜기 → power_loop 상태머신 시작 * device_sleep_mode() : 슬립 모드 진입 (처리 중단) * device_reactivated() : 슬립 복귀 → 전원 시퀀스 재시작 * power_loop() : 20ms 간격 전원 시퀀스 상태머신 콜백 * power_timer_start/stop : 전원 시퀀스 타이머 제어 * power_timer_init() : 전원 시퀀스 타이머 초기화 (앱 시작 시 1회) * ******************************************************************************/ #ifndef _POWER_CONTROL_H_ #define _POWER_CONTROL_H_ #include "main.h" /** @brief 디바이스 슬립 모드 진입 (processing 해제) */ int device_sleep_mode(void); /** @brief 디바이스 전원 켜기 (전원 시퀀스 상태머신 시작) */ int device_activated(void); /** @brief 디바이스 재활성화 (슬립 복귀 시 I2C 재초기화 후 시퀀스 재시작) */ int device_reactivated(void); /** @brief 전원 시퀀스 상태머신 (20ms 타이머 콜백, Step 0→1→2) */ void power_loop(void * p_context); /* For x ms */ /** @brief 전원 시퀀스 타이머 시작 (20ms 싱글샷) */ void power_timer_start(void); /** @brief 전원 시퀀스 타이머 정지 */ void power_timer_stop(void);; /** @brief 전원 시퀀스 타이머 초기화 (앱 시작 시 1회 호출) */ void power_timer_init(void); #endif //_POWER_CONTROL_H_