gotnone / spingw Goto Github PK
View Code? Open in Web Editor NEWThis project forked from waynix/spingw
SerialPort for MinGW
Home Page: http://r0sset.com/Projects/24
This project forked from waynix/spingw
SerialPort for MinGW
Home Page: http://r0sset.com/Projects/24
This Repository contains a wrapper to access the SerialPort in MinGW. Website:http://r0sset.com/Projects/24 Dependencies: Windows (tested under XP and 7) MinGW (not tested with Visual Studio and Cygwin) Usage: 1. Copy or fork SPinGW 2. Include serialport.h and serialport.c to your program. 3. Call openSerialPort from your program. 4. Use writeToSerialPort and readFromSerialPort to transfer data 5. Close the port with closeSerialPort when the communication is finished example.c: #include <stdio.h> #include "serialport.h" int main(void) { HANDLE h = openSerialPort("COM5",B9600,one,off); char sendbuffer[] = "test"; char readbuffer[100]; //write test int bytesWritten = writeToSerialPort(h,sendbuffer,strlen(sendbuffer)); printf("%d Bytes were written\n",bytesWritten); //read something int bytesRead = readFromSerialPort(h,readbuffer,99); readbuffer[bytesRead]=0; printf("%d Bytes were read:%s\n",bytesRead,readbuffer); closeSerialPort(h); return 0; } 6. compile gcc example.c serialport.c -o example.exe FAQ: Comports with a bigger number (I believe bigger than 9) can be used by with their UNC Paths \\\\.\\COM11 (thanks to jaui)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.