⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 teste.c

📁 It is a software to decode information received by a normal GPS like GARMIN, UBLOX if it sends NMEA
💻 C
字号:
#include <termios.h> #include <string.h>                                                        #include <stdio.h>  #include <stdlib.h>                                                         #include <unistd.h>                                                          #include <fcntl.h>                                                           #include <sys/signal.h>                                                      #include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <errno.h>#include "garmin_api.h"#include "connect.h"char port[30];int baudrate=19200;int main(void){	int fd, tam;	char buf[1000];	strcpy(port,"/dev/ttyUSB0");	init_port(&fd,&port[0],baudrate);		while(1)	{		read_port(&fd,&buf[0],&tam);		buf[tam]=0;				printf("%s",buf);	}		return 0 ;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -