46 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
/****************************************************************************
 | 
						|
 | 
						|
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.
 | 
						|
 | 
						|
****************************************************************************/
 | 
						|
#include "iot_io_api.h"
 | 
						|
 | 
						|
/* cli includes */
 | 
						|
#include "iot_cli.h"
 | 
						|
#include "iot_cli_msg_id_definition.h"
 | 
						|
 | 
						|
/* ftm internal includes */
 | 
						|
#include "iot_ftm_cus_cmd.h"
 | 
						|
#include "iot_ftm_msg.h"
 | 
						|
#include "iot_ftm_internal.h"
 | 
						|
 | 
						|
#if IOT_FTM_SUPPORT
 | 
						|
extern iot_ftm_global_t *p_ftm_glb;
 | 
						|
 | 
						|
/* used for customer */
 | 
						|
void iot_ftm_cmd_cus_cmd(uint8_t *data, uint16_t len)
 | 
						|
{
 | 
						|
    (void)data;
 | 
						|
    (void)len;
 | 
						|
    iot_printf("iot_ftm_cmd_cus_cmd is called\n");
 | 
						|
 | 
						|
    /* report event back to CLI */
 | 
						|
    iot_ftm_event_t *event = (iot_ftm_event_t *)p_ftm_glb->event;
 | 
						|
    event->event_id = IOT_FTM_EVENT_ID_CUS_CMD;
 | 
						|
    event->total_len = 1;
 | 
						|
    event->len = 1;
 | 
						|
    cli_send_module_msg(CLI_MODULEID_FTM, 0x01, p_ftm_glb->event,
 | 
						|
        sizeof(*event) + event->len);
 | 
						|
    return;
 | 
						|
}
 | 
						|
 | 
						|
#endif /* IOT_FTM_SUPPORT */ |