9a7bfcd9f3
- 전원 꺼진 상태에서 15초 이상 전원 버튼 누르고 있는 경우 본드 삭제 및 재부팅 - 본드 삭제 완료 시 주황 LED ON
36 lines
1.3 KiB
C
36 lines
1.3 KiB
C
/*******************************************************************************
|
|
* @file led_control.h
|
|
* @brief LED direct control driver
|
|
*
|
|
* Green (P0.12) + Orange (P0.29) 2-color LED with k_timer based patterns
|
|
******************************************************************************/
|
|
#ifndef LED_CONTROL_H__
|
|
#define LED_CONTROL_H__
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
/*==============================================================================
|
|
* LED state enumeration
|
|
*============================================================================*/
|
|
typedef enum
|
|
{
|
|
LED_STATE_OFF = 0,
|
|
LED_STATE_POWER_ON, // 1: Green ON 2s -> stay on
|
|
LED_STATE_POWER_OFF, // 2: Green ON 2s -> OFF
|
|
LED_STATE_ADVERTISING, // 3: Green blink 500ms/500ms
|
|
LED_STATE_DETACH_WARNING, // 4: Green 1s on / 3s off
|
|
LED_STATE_ALIGN_SEARCHING, // 5: Orange blink 1s/1s
|
|
LED_STATE_ALIGN_COMPLETE, // 6: Green ON
|
|
LED_STATE_ERROR, // 7: Orange 3Hz x3 / 1s off
|
|
LED_STATE_BOND_DELETE, // Bond Delete: Orange on
|
|
LED_STATE_COUNT
|
|
} led_state_t;
|
|
|
|
void led_init(void);
|
|
void led_set_state(led_state_t state);
|
|
led_state_t led_get_state(void);
|
|
void led_ble_solid(void);
|
|
|
|
#endif /* LED_CONTROL_H__ */
|