Home
last modified time | relevance | path

Searched refs:ret (Results 1 - 25 of 80) sorted by relevance

1234

/vendor/hisilicon/hispark_pegasus/demo/histreaming_demo/
H A Dwifi_sta.c75 int ret = 0; in hi_wifi_start_connect() local
97 ret = hi_wifi_sta_connect(&assoc_req); in hi_wifi_start_connect()
98 if (ret != HISI_OK) { in hi_wifi_start_connect()
107 int ret; in hi_wifi_start_sta() local
114 ret = hi_wifi_init(wifi_vap_res_num, wifi_user_res_num); in hi_wifi_start_sta()
115 if (ret != HISI_OK) { in hi_wifi_start_sta()
119 ret = hi_wifi_sta_start(ifname, &len); in hi_wifi_start_sta()
120 if (ret != HISI_OK) { in hi_wifi_start_sta()
127 ret = hi_wifi_register_event_callback(wifi_wpa_event_cb); in hi_wifi_start_sta()
128 if (ret ! in hi_wifi_start_sta()
174 int ret; hi_wifi_stop_sta() local
[all...]
H A Dwifi_softap.c49 int ret = 0; in hi_wifi_start_softap() local
62 ret = hi_wifi_init(wifi_vap_res_num, wifi_user_res_num); in hi_wifi_start_softap()
63 if (ret != HISI_OK) { in hi_wifi_start_softap()
78 ret = hi_wifi_softap_start(&hapd_conf, ifname, &len); in hi_wifi_start_softap()
79 if (ret != HISI_OK) { in hi_wifi_start_softap()
103 int ret; in hi_wifi_stop_softap() local
108 ret = hi_wifi_softap_stop(); in hi_wifi_stop_softap()
109 if (ret != HISI_OK) { in hi_wifi_stop_softap()
113 ret = hi_wifi_deinit(); in hi_wifi_stop_softap()
114 if (ret ! in hi_wifi_stop_softap()
[all...]
/vendor/hisilicon/hispark_pegasus/demo/coap_demo/
H A Diot_profile.c25 cJSON *ret = NULL; in FormatProfileValue() local
28 ret = cJSON_CreateNumber(kv->iValue); in FormatProfileValue()
31 ret = cJSON_CreateNumber((double)(*(long *)kv->value)); in FormatProfileValue()
34 ret = cJSON_CreateNumber((double)(*(float *)kv->fvalue)); in FormatProfileValue()
37 ret = cJSON_CreateNumber((*(double *)kv->dvalue)); in FormatProfileValue()
40 ret = cJSON_CreateString((const char *)kv->value); in FormatProfileValue()
45 return ret; in FormatProfileValue()
165 char *ret = NULL; in MakeTopic() local
171 ret = hi_malloc(0, len); in MakeTopic()
172 if (ret ! in MakeTopic()
187 char *ret = NULL; MakeProfileCmdResp() local
239 int ret = -1; IoTProfileCmdResp() local
263 char *ret = NULL; MakeProfilePropertyReport() local
291 int ret = -1; IoTProfilePropertyReport() local
[all...]
H A Diot_hmac.c50 int ret = -1; in HmacGeneratePwd() local
56 return ret; in HmacGeneratePwd()
61 return ret; in HmacGeneratePwd()
65 ret = mbedtls_md_setup(&mbedtls_md_ctx, mdInfo, 1); in HmacGeneratePwd()
66 if (ret != 0) { in HmacGeneratePwd()
68 return ret; in HmacGeneratePwd()
77 return ret; in HmacGeneratePwd()
H A Diot_main.c90 int ret = 0; in MsgRcvCallBack() local
103 ret = memcpy_s(buf, bufSize, topic, topicLength); in MsgRcvCallBack()
104 if (ret != EOK) { in MsgRcvCallBack()
111 ret = memcpy_s(buf, bufSize, message->payload, message->payloadlen); in MsgRcvCallBack()
112 if (ret != EOK) { in MsgRcvCallBack()
138 hi_u32 ret; in IoTMsgProcess() local
145 ret = MQTTClient_publishMessage(client, msg->topic, &pubmsg, &g_ioTAppCb.tocken); in IoTMsgProcess()
146 if (ret != MQTTCLIENT_SUCCESS) { in IoTMsgProcess()
167 hi_u32 ret; in ProcessQueueMsg() local
177 ret in ProcessQueueMsg()
226 int ret = ProcessQueueMsg(client); // do the job here MqttProcess() local
242 int ret = 0; MainEntryProcess() local
293 hi_u32 ret; IoTMain() local
320 int ret = 0; IotSendMsg() local
[all...]
H A Diot_log.c30 int ret = -1; in IoTLogLevelSet() local
33 ret = 0; in IoTLogLevelSet()
35 return ret; in IoTLogLevelSet()
/vendor/hisilicon/hispark_pegasus/demo/oc_demo/
H A Diot_profile.c25 cJSON *ret = NULL; in FormatProfileValue() local
28 ret = cJSON_CreateNumber(kv->iValue); in FormatProfileValue()
31 ret = cJSON_CreateNumber((double)(*(long *)kv->value)); in FormatProfileValue()
34 ret = cJSON_CreateString((const char *)kv->value); in FormatProfileValue()
39 return ret; in FormatProfileValue()
159 char *ret = NULL; in MakeTopic() local
166 ret = hi_malloc(0, len); in MakeTopic()
167 if (ret != NULL) { in MakeTopic()
169 if (snprintf_s(ret, len + 1, len, fmt, deviceId, requestID) < 0) { in MakeTopic()
173 if (snprintf_s(ret, le in MakeTopic()
186 char *ret = NULL; MakeProfileCmdResp() local
239 int ret = -1; IoTProfileCmdResp() local
263 char *ret = NULL; MakeProfilePropertyReport() local
291 int ret = -1; IoTProfilePropertyReport() local
[all...]
H A Dwifi_connecter.c92 err_t ret; in ConnectToHotspot() local
94 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
95 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
97 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
98 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
102 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
103 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
110 if (ret == ERR_OK) { in ConnectToHotspot()
115 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
124 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/samart_environmental_monitoring_system_demo/environment/
H A Denvironment_demo.c84 int ret = UtilsGetValue(PARAM_TEMP_MAX, tempMax, LENGTH); in GetValue() local
85 if (ret < 0) { in GetValue()
86 printf("get tempMax value failed, ret is %d\r\n", ret); in GetValue()
91 ret = UtilsGetValue(PARAM_TEMP_MIN, tempMin, LENGTH); in GetValue()
92 if (ret < 0) { in GetValue()
93 printf("get tempMin value failed, ret is %d\r\n", ret); in GetValue()
98 ret = UtilsGetValue(PARAM_HUMI_MAX, humiMax, LENGTH); in GetValue()
99 if (ret < in GetValue()
194 int ret = GetValue(); EnvironmentTask() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/udp_demo/
H A Dwifi_softap.c47 int ret; in HiWifiStartSoftap() local
66 ret = hi_wifi_softap_start(&hapd_conf, ifname, &len); in HiWifiStartSoftap()
67 if (ret != HISI_OK) { in HiWifiStartSoftap()
91 int ret; in HiWifiStopSoftap() local
96 ret = hi_wifi_softap_stop(); in HiWifiStopSoftap()
97 if (ret != HISI_OK) { in HiWifiStopSoftap()
101 ret = hi_wifi_deinit(); in HiWifiStopSoftap()
102 if (ret != HISI_OK) { in HiWifiStopSoftap()
/vendor/hisilicon/hispark_pegasus/demo/iottencent_demo/
H A Diot_hmac.c61 int ret = -1; in HmacGeneratePwd() local
69 return ret; in HmacGeneratePwd()
74 return ret; in HmacGeneratePwd()
78 ret = mbedtls_md_setup(&mbedtls_md_ctx, md_info, 1); in HmacGeneratePwd()
79 if (ret != 0) { in HmacGeneratePwd()
81 return ret; in HmacGeneratePwd()
89 ret = byte2hexstr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
90 if (ret != 0) { in HmacGeneratePwd()
91 return ret; in HmacGeneratePwd()
94 return ret; in HmacGeneratePwd()
[all...]
H A Diot_profile.c27 cJSON *ret = NULL; in FormatProfileValue() local
30 ret = cJSON_CreateNumber(kv->iValue); in FormatProfileValue()
33 ret = cJSON_CreateNumber((double)(*(long *)kv->value)); in FormatProfileValue()
36 ret = cJSON_CreateString((const char *)kv->value); in FormatProfileValue()
41 return ret; in FormatProfileValue()
166 char *ret = NULL; in MakeTopic() local
173 ret = hi_malloc(0, len); in MakeTopic()
174 if (ret != NULL) { in MakeTopic()
176 (void)snprintf_s(ret, len, len, fmt, deviceID, requestID); in MakeTopic()
178 (void)snprintf_s(ret, le in MakeTopic()
189 char *ret = NULL; MakeProfileCmdResp() local
239 char *ret = NULL; MakeProfilePropertyReport() local
269 char *ret = NULL; MakeProfileReport() local
316 int ret = -1; IoTProfilePropertyReport() local
[all...]
H A Diot_log.c30 int ret = -1; in IoTLogLevelSet() local
33 ret = 0; in IoTLogLevelSet()
35 return ret; in IoTLogLevelSet()
/vendor/hisilicon/hispark_pegasus/demo/mqtt_demo/
H A Diot_hmac.c61 int ret = -1; in HmacGeneratePwd() local
69 return ret; in HmacGeneratePwd()
74 return ret; in HmacGeneratePwd()
78 ret = mbedtls_md_setup(&mbedtls_md_ctx, md_info, 1); in HmacGeneratePwd()
79 if (ret != 0) { in HmacGeneratePwd()
81 return ret; in HmacGeneratePwd()
89 ret = byte2hexstr(hash, CN_HMAC256_LEN, (char *)buf); in HmacGeneratePwd()
90 if (ret != 0) { in HmacGeneratePwd()
91 return ret; in HmacGeneratePwd()
94 return ret; in HmacGeneratePwd()
[all...]
H A Diot_profile.c27 cJSON *ret = NULL; in FormatProfileValue() local
30 ret = cJSON_CreateNumber(kv->iValue); in FormatProfileValue()
33 ret = cJSON_CreateNumber((double)(*(long *)kv->value)); in FormatProfileValue()
36 ret = cJSON_CreateString((const char *)kv->value); in FormatProfileValue()
41 return ret; in FormatProfileValue()
166 char *ret = NULL; in MakeTopic() local
173 ret = hi_malloc(0, len); in MakeTopic()
174 if (ret != NULL) { in MakeTopic()
176 (void)snprintf_s(ret, len, len, fmt, deviceID, requestID); in MakeTopic()
178 (void)snprintf_s(ret, le in MakeTopic()
189 char *ret = NULL; MakeProfileCmdResp() local
239 char *ret = NULL; MakeProfilePropertyReport() local
269 char *ret = NULL; MakeProfileReport() local
316 int ret = -1; IoTProfilePropertyReport() local
[all...]
H A Diot_log.c30 int ret = -1; in IoTLogLevelSet() local
33 ret = 0; in IoTLogLevelSet()
35 return ret; in IoTLogLevelSet()
/vendor/hisilicon/hispark_pegasus/demo/histreaming_client_demo/
H A Dwifi_connecter.c25 int ret = 0; in PrintLinkedInfo() local
104 err_t ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot() local
105 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
107 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
108 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
112 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
113 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
123 err_t ret = netifapi_dhcp_stop(g_iface); in DisconnectWithHotspot() local
124 printf("netifapi_dhcp_stop: %d\r\n", ret); in DisconnectWithHotspot()
/vendor/hisilicon/hispark_pegasus/demo/lwip_demo/
H A Dwifi_connecter.c25 int ret = 0; in PrintLinkedInfo() local
104 err_t ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot() local
105 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
107 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
108 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
112 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
113 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
123 err_t ret = netifapi_dhcp_stop(g_iface); in DisconnectWithHotspot() local
124 printf("netifapi_dhcp_stop: %d\r\n", ret); in DisconnectWithHotspot()
/vendor/hisilicon/hispark_pegasus/demo/samart_environmental_monitoring_system_demo/udpserver_env/
H A Dwifi_connecter.c100 err_t ret = 0; in ConnectToHotspot() local
102 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
103 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
105 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
106 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
110 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
111 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
117 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
118 if (ret == ERR_OK) { in ConnectToHotspot()
123 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
132 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/smart_night_light_demo/udpserver_light/
H A Dwifi_connecter.c100 err_t ret = 0; in ConnectToHotspot() local
102 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
103 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
105 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
106 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
110 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
111 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
117 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
118 if (ret == ERR_OK) { in ConnectToHotspot()
123 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
132 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/sntp_demo/test/
H A Dwifi_connecter.c99 err_t ret = 0; in ConnectToHotspot() local
101 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
102 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
104 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
105 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
110 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
116 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
117 if (ret == ERR_OK) { in ConnectToHotspot()
122 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
131 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/tcpclient_demo/
H A Dwifi_connecter.c99 err_t ret = 0; in ConnectToHotspot() local
101 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
102 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
104 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
105 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
110 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
116 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
117 if (ret == ERR_OK) { in ConnectToHotspot()
122 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
130 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/tcpserver_demo/
H A Dwifi_connecter.c99 err_t ret = 0; in ConnectToHotspot() local
101 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
102 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
104 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
105 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
110 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
116 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
117 if (ret == ERR_OK) { in ConnectToHotspot()
122 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
131 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/udpclient_demo/
H A Dwifi_connecter.c99 err_t ret = 0; in ConnectToHotspot() local
101 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
102 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
104 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
105 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
110 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
116 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
117 if (ret == ERR_OK) { in ConnectToHotspot()
122 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
131 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]
/vendor/hisilicon/hispark_pegasus/demo/udpserver_demo/
H A Dwifi_connecter.c99 err_t ret = 0; in ConnectToHotspot() local
101 ret = netifapi_set_hostname(g_iface, hostname, strlen(hostname)); in ConnectToHotspot()
102 printf("netifapi_set_hostname: %d\r\n", ret); in ConnectToHotspot()
104 ret = netifapi_dhcp_start(g_iface); in ConnectToHotspot()
105 printf("netifapi_dhcp_start: %d\r\n", ret); in ConnectToHotspot()
109 ret = netifapi_netif_common(g_iface, dhcp_clients_info_show, NULL); in ConnectToHotspot()
110 printf("netifapi_netif_common: %d\r\n", ret); in ConnectToHotspot()
116 ret = netifapi_netif_get_addr(g_iface, &ip, &netmask, &gw); in ConnectToHotspot()
117 if (ret == ERR_OK) { in ConnectToHotspot()
122 printf("netifapi_netif_get_addr: %d\r\n", ret); in ConnectToHotspot()
131 err_t ret = netifapi_dhcp_stop(g_iface); DisconnectWithHotspot() local
[all...]

Completed in 8 milliseconds

1234