45 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.5 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.
 | |
| 
 | |
| ****************************************************************************/
 | |
| 
 | |
| #include "iot_oem.h"
 | |
| #include "iot_io_api.h"
 | |
| 
 | |
| #include "iot_cli.h"
 | |
| #include "iot_cli_module_config.h"
 | |
| #include "iot_cli_tx_rx.h"
 | |
| #include "iot_cli_host_interface.h"
 | |
| #include "iot_cli_oem.h"
 | |
| 
 | |
| #ifdef HOST_APP_FEATURE_ENABLE
 | |
| 
 | |
| void cli_get_oem_misc_cfg(
 | |
|     uint8_t *buffer, uint32_t bufferlen, uint8_t *src_mac)
 | |
| {
 | |
|     (void)buffer;
 | |
|     (void)bufferlen;
 | |
|     cli_oem_misc_cfg cfg = {0};
 | |
|     iot_oem_cfg_t *oem_cfg = NULL;
 | |
| 
 | |
|     iot_oem_get_cfg(&oem_cfg);
 | |
|     if (oem_cfg != NULL) {
 | |
|         cfg.passcode = oem_cfg->misc_cfg.passcode;
 | |
|         cfg.sec_type = oem_cfg->misc_cfg.sec_type;
 | |
|     }
 | |
| 
 | |
|     iot_cli_send_to_host(
 | |
|         CLI_MSGID_GET_OEM_MISC_INFO, (uint8_t *)&cfg, sizeof(cfg), src_mac);
 | |
| }
 | |
| 
 | |
| #endif |