![]() |
| | #1 |
| Registered User Join Date: Sep 2009
Posts: 4
| RS-232 for Linux and WIN32 With this library, you can use GCC on Linux and MinGW on windows to access the serial port without the need to make any changes in your sourcecode. Regards. |
| Theodoor is offline | |
| | #2 |
| Registered User Join Date: Sep 2009 Location: Zagreb, Croatia
Posts: 179
| woooooooow, thanks man!
__________________ "Hackers build things, crackers destroy them." I am an 13 year old wannabe AI programmer. For now I am programing with perceptrons. |
| yann is offline | |
| | #3 |
| Registered User Join Date: Sep 2009 Location: Zagreb, Croatia
Posts: 179
| is there anything like this for the USB port?
__________________ "Hackers build things, crackers destroy them." I am an 13 year old wannabe AI programmer. For now I am programing with perceptrons. |
| yann is offline | |
| | #4 |
| Registered User Join Date: Sep 2009 Location: Zagreb, Croatia
Posts: 179
| But....how to install the library?
__________________ "Hackers build things, crackers destroy them." I am an 13 year old wannabe AI programmer. For now I am programing with perceptrons. |
| yann is offline | |
| | #5 |
| Registered User Join Date: Sep 2009
Posts: 4
| Put the two files in the directory where your other C files are. Put the following define in the headerfile of the module from where you want to use the RS-232 functions: #include "rs232.h" Don't forget to tell your compiler that it has to compile and link the rs232.c file. For example: gcc main.c rs232.c -o myprogramname |
| Theodoor is offline | |
| | #6 |
| Registered User Join Date: Sep 2009 Location: Zagreb, Croatia
Posts: 179
| Ok thanks, is there anything like this for USB-port?
__________________ "Hackers build things, crackers destroy them." I am an 13 year old wannabe AI programmer. For now I am programing with perceptrons. |
| yann is offline | |
| | #7 | |
| Registered User Join Date: Sep 2009
Posts: 4
| You can use this library for USB-devices as well in case your USB-device uses a FTDI-chip for USB-connection in combination with a VCP-driver (Virtual ComPort). Linux has this USB-VCP-driver already built-in. For windows you need to download a free driver from the FTDI website. For more info about VCP-drivers for USB-devices, visit: Virtual COM Port Drivers Quote:
| |
| Theodoor is offline | |
| | #8 |
| Registered User Join Date: Sep 2009 Location: Zagreb, Croatia
Posts: 179
| Thanks man...can you give me some code examples for USB?
__________________ "Hackers build things, crackers destroy them." I am an 13 year old wannabe AI programmer. For now I am programing with perceptrons. |
| yann is offline | |
| | #9 | |
| Registered User Join Date: Sep 2009
Posts: 4
| There is no difference with a serial port because the VCP-drivers emulates a serial port. Except for that you have to open /dev/ttyUSB0 instead of /dev/ttyS0. Quote:
| |
| Theodoor is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| serial port control | Unregistered | C++ Programming | 1 | 08-09-2002 06:44 PM |
| OpenGL and Windows | sean345 | Game Programming | 5 | 06-24-2002 10:14 PM |
| Need help or info about serial port communication | Unregistered | Linux Programming | 1 | 01-08-2002 01:48 PM |
| serial port still wont work | alcoholic | C++ Programming | 6 | 10-31-2001 12:51 PM |
| sendng bytes to a serial port need help | alcoholic | C++ Programming | 1 | 10-28-2001 11:17 AM |