scope.c
来自「实时linux RTAI 下的如何使用RTFIFO代码」· C语言 代码 · 共 26 行
C
26 行
#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/mman.h>#include <sys/stat.h>#include <fcntl.h>#include <signal.h>#include <rtai_shm.h>#include "parameters.h"static int end;static void endme(int dummy) { end=1; }int main (void){ struct data_str *data; signal(SIGINT, endme); data = rtai_malloc (nam2num(SHMNAM),1); while (!end) { printf(" Counter : %d Sine : %f Cosine : %f \n", data->indx_counter, data->sin_value, data->cos_value); } rtai_free (nam2num(SHMNAM), &data); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?