42 #include <px4_platform_common/px4_config.h> 50 #include <nshlib/nshlib.h> 61 printf(
"Usage: nshterm <device>\n");
78 fd = open(argv[1], O_RDWR);
96 struct termios uart_config;
100 if ((termios_state = tcgetattr(fd, &uart_config)) < 0) {
101 warnx(
"ERR get config %s: %d\n", argv[1], termios_state);
107 uart_config.c_oflag |= (ONLCR | OPOST);
109 if ((termios_state = tcsetattr(fd, TCSANOW, &uart_config)) < 0) {
110 warnx(
"ERR set config %s\n", argv[1]);
123 nsh_consolemain(0, NULL);
High-resolution timer with callouts and timekeeping.
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
__EXPORT int nshterm_main(int argc, char *argv[])
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).