support aliyun sdk on TencentOS tiny
sample: examples\aliyun_iotkit_csdk_mqtt project: board\TencentOS_tiny_EVB_MX_Plus\KEIL\aliyun_iotkit_csdk_mqtt
This commit is contained in:
45
components/connectivity/iotkit-embedded-3.0.1/3rdparty/src/atm/at_api.c
vendored
Normal file
45
components/connectivity/iotkit-embedded-3.0.1/3rdparty/src/atm/at_api.c
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2019 Alibaba Group Holding Limited
|
||||
*/
|
||||
|
||||
#include "infra_config.h"
|
||||
|
||||
int at_conn_init(void);
|
||||
int at_parser_init(void);
|
||||
|
||||
/* See detail struct definition in at_wrapper.h */
|
||||
struct at_conn_input;
|
||||
struct at_mqtt_input;
|
||||
int at_conn_input(struct at_conn_input *param);
|
||||
int at_mqtt_input(struct at_mqtt_input *param);
|
||||
|
||||
int IOT_ATM_Init(void)
|
||||
{
|
||||
#ifdef AT_PARSER_ENABLED
|
||||
if (at_parser_init() < 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AT_TCP_ENABLED
|
||||
if (at_conn_init() < 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int IOT_ATM_Input(void * param)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
#if defined(AT_TCP_ENABLED)
|
||||
ret = at_conn_input((struct at_conn_input *)param);
|
||||
#elif defined(AT_MQTT_ENABLED)
|
||||
ret = at_mqtt_input((struct at_mqtt_input *)param);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
Reference in New Issue
Block a user