/**************************************************************************** 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_BRM_ASS_CHECK_H #define IOT_BRM_ASS_CHECK_H /* os shim includes */ #include "os_types_api.h" /* iot common header files */ #include "iot_config_api.h" #ifdef __cplusplus extern "C" { #endif #if IOT_BRM_ENABLE /* assembly check module event definition */ typedef enum { iot_brm_ass_event_timer, iot_brm_ass_event_data, } iot_brm_ass_event_t; /** * @brief iot_brm_ass_check_handle() - handling assembly check module event. * @param event: event type, see iot_brm_ass_event_t. * @param buf: data of event. */ void iot_brm_ass_check_handle(iot_brm_ass_event_t event, void *data); /** * @brief iot_brm_handle_ass_check_req() - handling assembly check request * message. * @param ds: pointer to start of message * @param len: length of message. * @retval ERR_OK - for success case, othersie - error code. */ uint8_t iot_brm_ass_handle_check_req(uint8_t *ds, uint8_t len); /** * @brief iot_brm_ass_check_fill_result() - filling assembly check results. * @param buf: buffer to be filled * @param len: bufer length limit * @param start_index: node assembly info start index to be fill. * @param query_cnt: node assembly info counter to be fill. * @retval: actual filled data length. */ uint8_t iot_brm_ass_check_fill_result(uint8_t *buf, uint8_t len, uint8_t start_index, uint8_t query_cnt); /** * @brief iot_brm_ass_check_wiring() - wiring assembly check. */ void iot_brm_ass_check_wiring(void); /** * @brief iot_brm_ass_check_bd_recv_handle() - receiving branch identn info for * wiring check. * @param phase: if == null, means receiving failed, otherwise it means * the phase of receiving information */ void iot_brm_ass_check_bd_recv_handle(uint8_t *phase); /** * @brief iot_brm_ass_init() - initialize BRM assembly check module. */ void iot_brm_ass_init(void); #endif /* IOT_BRM_ENABLE */ #ifdef __cplusplus } #endif #endif /* IOT_BRM_ASS_CHECK_H */