107 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			107 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/****************************************************************************
 | 
						|
 | 
						|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | 
						|
 | 
						|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | 
						|
be copied by any method or incorporated into another program without
 | 
						|
the express written consent of Aerospace C.Power. This Information or any portion
 | 
						|
thereof remains the property of Aerospace C.Power. The Information contained herein
 | 
						|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | 
						|
liability for its use in any way and conveys no license or title under
 | 
						|
any patent or copyright and makes no representation or warranty that this
 | 
						|
Information is free from patent or copyright infringement.
 | 
						|
 | 
						|
****************************************************************************/
 | 
						|
#ifndef IOT_PLC_LED_API_H
 | 
						|
#define IOT_PLC_LED_API_H
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
extern "C" {
 | 
						|
#endif
 | 
						|
 | 
						|
/** define supported plc related led request */
 | 
						|
/** invalid led request */
 | 
						|
#define IOT_PLC_LED_REQ_INVAL               0
 | 
						|
/** PLC TX in phase A led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_TX_PHASE_A      1
 | 
						|
/** PLC TX in phase B led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_TX_PHASE_B      2
 | 
						|
/** PLC TX in phase C led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_TX_PHASE_C      3
 | 
						|
/** PLC RX led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_RX              4
 | 
						|
/** 485 bus TX led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_485_TX          5
 | 
						|
/** 485 bus RX led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_485_RX          6
 | 
						|
/** STA associated to network */
 | 
						|
#define IOT_PLC_LED_ASSOCIATED              7
 | 
						|
/** STA dis-associated to network */
 | 
						|
#define IOT_PLC_LED_DIS_ASSOCIATED          8
 | 
						|
/** STA is associating to network */
 | 
						|
#define IOT_PLC_LED_ASSOCIATING             9
 | 
						|
/** STA get meter address */
 | 
						|
#define IOT_PLC_LED_METER_FOUND             10
 | 
						|
/** upgrade ongoing request */
 | 
						|
#define IOT_PLC_LED_UPGRADE_ON              11
 | 
						|
/** upgrade done request */
 | 
						|
#define IOT_PLC_LED_UPGRADE_OFF             12
 | 
						|
/** PLC APP data TX led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_APP_TX          13
 | 
						|
/** PLC APP data RX led request */
 | 
						|
#define IOT_PLC_LED_REQ_PLC_APP_RX          14
 | 
						|
/** local device assembly check */
 | 
						|
#define IOT_PLC_LED_CHECK                   15
 | 
						|
/** STA search meter start */
 | 
						|
#define IOT_PLC_LED_SEARCH_METER_START      16
 | 
						|
/** STA search meter end */
 | 
						|
#define IOT_PLC_LED_SEARCH_METER_END        17
 | 
						|
/** STA search meter found */
 | 
						|
#define IOT_PLC_LED_SEARCH_METER_FOUND      18
 | 
						|
/** white list enable */
 | 
						|
#define IOT_PLC_LED_WL_ENABLE               19
 | 
						|
/** white list disable */
 | 
						|
#define IOT_PLC_LED_WL_DISABLE              20
 | 
						|
/** signal led flash once */
 | 
						|
#define IOT_PLC_LED_SIGNAL_WEAK             21
 | 
						|
/** signal led flash twice */
 | 
						|
#define IOT_PLC_LED_SIGNAL_GOOD             22
 | 
						|
/** signal led flash three times */
 | 
						|
#define IOT_PLC_LED_SIGNAL_STRONG           23
 | 
						|
/** all white list sta joined network */
 | 
						|
#define IOT_PLC_LED_NET_FORMAT_DONE         24
 | 
						|
/** RF APP data TX led request */
 | 
						|
#define IOT_PLC_LED_REQ_RF_APP_TX           25
 | 
						|
 | 
						|
/** define supported plc led scheme */
 | 
						|
/** standard state grid scheme, this is the default scheme */
 | 
						|
#define IOT_PLC_LED_SCHEME_SG               0
 | 
						|
/** hx scheme */
 | 
						|
#define IOT_PLC_LED_SCHEME_HX               1
 | 
						|
/** south power grid scheme */
 | 
						|
#define IOT_PLC_LED_SCHEME_SPG              2
 | 
						|
/** smart house scheme */
 | 
						|
#define IOT_PLC_LED_SCHEME_SH               3
 | 
						|
 | 
						|
/* @brief       plc led blink request
 | 
						|
 * @param req:  led blink request. see IOT_PLC_LED_REQ_XXX
 | 
						|
 */
 | 
						|
void iot_plc_led_request(uint8_t req);
 | 
						|
 | 
						|
/* @brief           set plc led scheme. must be called before calling
 | 
						|
 *                  iot_plc_entry.
 | 
						|
 * @param scheme:   led scheme to be set. see IOT_PLC_LED_SCHEME_XXX
 | 
						|
 */
 | 
						|
void iot_plc_led_scheme_set(uint8_t scheme);
 | 
						|
 | 
						|
/* @brief           get current plc led scheme.
 | 
						|
 * @return          see IOT_PLC_LED_SCHEME_XXX
 | 
						|
 */
 | 
						|
uint8_t iot_plc_led_scheme_get();
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
}
 | 
						|
#endif
 | 
						|
 | 
						|
#endif /* IOT_PLC_LED_API_H */
 |