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

Function open_comm

examples/libc/termios_test.c:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62int open_comm(const char *name)
63{
64 int fd;
65 fd = open(name, O_RDWR | O_NOCTTY | O_NONBLOCK, 0);
66 if(fd == -1)
67 {
68 rt_kprintf("Open %s fail.\n",name);
69 return -1;
70 }
71 else
72 {
73 rt_kprintf("Open %s success,fd:%d\n",name,fd);
74 }
75
76 return fd;
77}
78
79void close_comm(int fd)
80{

Callers 1

termios_test_entryFunction · 0.85

Calls 2

rt_kprintfFunction · 0.85
openFunction · 0.50

Tested by

no test coverage detected