1

I'm making an application that uses the UART port from the 40pin headers and I found online that there's a library called wiringSerial.h

I was wondering what's the difference between wiringSerial.h and the standard open close unistd.h method we use on Linux machines?

My Raspberry Pi runs raspbian lite.

1

wiringSerial is part of wiringPi.

wiringPi is an "Arduino" like C library to control the GPIO.

wiringSerial is a simple wrapper around the underlying Linux serial driver. It simplifies some operations. Look at the source code if you need details.

Note that wiringPi is deprecated (i.e. no longer being developed or supported by its author).

2
  • I noticed that it looks abandoned. Thanks
    – MrBit
    Jul 18 '20 at 12:16
  • 1
    There are at least two other C libraries. My pigpio and the bcm2835 library. pigpio does offer a wrapper around serial operations.
    – joan
    Jul 18 '20 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.