完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
#include
static void atcmd(int argc, char**argv) { if (argc < 2) { rt_kprintf("Please input'atcmd return; } if (!rt_strcmp(argv[1], "server")) { rt_kprintf("AT server!n"); } else if (!rt_strcmp(argv[1], "client")) { rt_kprintf("AT client!n"); } else { rt_kprintf("Please input'atcmd } } MSH_CMD_EXPORT(atcmd, atcmd sample: atcmd |
|
|
|
|
|
int finsh_getchar(void)
{ #ifdef RT_USING_DEVICE char ch = 0; #ifdef RT_USING_POSIX_STDIO if(read(STDIN_FILENO, &ch, 1) > 0) { return ch; } else { return -1; /* EOF */ } #else rt_device_t device; RT_ASSERT(shell != RT_NULL); device = shell->device; if (device == RT_NULL) { return -1; /* EOF */ } while (rt_device_read(device, -1, &ch, 1) != 1) { rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER); if (shell->device != device) { device = shell->device; if (device == RT_NULL) { return -1; } } } return ch; #endif /* RT_USING_POSIX_STDIO */ #else extern char rt_hw_console_getchar(void); return rt_hw_console_getchar(); #endif /* RT_USING_DEVICE */ } const char *finsh_get_device(void); int finsh_getchar(void); |
|
|
|
|
|
|
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1033 浏览 0 评论
2877 浏览 0 评论
图腾柱PFC无法上升至400V,且电感电流为正弦波形,但是幅值极小
9386 浏览 0 评论
飞凌嵌入式ElfBoard-Vim编辑器之静态链接和动态链接
2898 浏览 0 评论
使用 LinkBoy 将程序导出为 C 语言代码并烧录至 Arduino ESP32 开发板
2302 浏览 1 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 07:21 , Processed in 0.590311 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
627