MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / at

Function at

components/net/at/src/at_cli.c:292–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290#endif /* AT_USING_CLIENT */
291
292static void at(int argc, char **argv)
293{
294
295 if (argc != 2 && argc != 3)
296 {
297 rt_kprintf("Please input '<server|client [dev_name]>' \n");
298 return;
299 }
300
301 at_cli_init();
302
303 if (!strcmp(argv[1], "server"))
304 {
305#ifdef AT_USING_SERVER
306 server_cli_parser();
307#else
308 rt_kprintf("Not support AT server, please check your configure!\n");
309#endif /* AT_USING_SERVER */
310 }
311 else if (!strcmp(argv[1], "client"))
312 {
313#ifdef AT_USING_CLIENT
314 at_client_t client = RT_NULL;
315
316 if (argc == 2)
317 {
318 client_cli_parser(at_client_get_first());
319 }
320 else if (argc == 3)
321 {
322 client = at_client_get(argv[2]);
323 if (client == RT_NULL)
324 {
325 rt_kprintf("input AT client device name(%s) error.\n", argv[2]);
326 }
327 else
328 {
329 client_cli_parser(client);
330 }
331 }
332#else
333 rt_kprintf("Not support AT client, please check your configure!\n");
334#endif /* AT_USING_CLIENT */
335 }
336 else
337 {
338 rt_kprintf("Please input '<server|client [dev_name]>' \n");
339 }
340
341 at_cli_deinit();
342}
343MSH_CMD_EXPORT(at, RT-Thread AT component cli: at <server|client [dev_name]>);
344
345#endif /* AT_USING_CLI */

Callers 15

drv_lcd.hFile · 0.85
drv_lcd.cFile · 0.85
drv_lcd.hFile · 0.85
drv_lcd.cFile · 0.85
ht32_cm3_misc.cFile · 0.85
drv_sdio.cFile · 0.85
drv_eth.cFile · 0.85
drv_mic.cFile · 0.85
drv_sound.cFile · 0.85
lv_port_disp.cFile · 0.85
drv_ov5640.cFile · 0.85

Calls 7

rt_kprintfFunction · 0.85
at_cli_initFunction · 0.85
server_cli_parserFunction · 0.85
client_cli_parserFunction · 0.85
at_client_get_firstFunction · 0.85
at_client_getFunction · 0.85
at_cli_deinitFunction · 0.85

Tested by

no test coverage detected