libserialport-cr

About Crystal C-Bindings for https://sigrok.org/wiki/Libserialport used for communicating with serial ports

Ubuntu Build Windows Build

Ubuntu Emulation Test

libserialport-cr

A Crystal C-Binding library of libserialport

"libserialport (sometimes abbreviated as "sp") is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports."

Installation

Linux

  1. Run
sudo sh ./rsrc/install.sh
  1. Add libserialport-cr to your shard.yml dependencies like so:
dependencies:
  libserialport-cr:
    github: D-Shwagginz/libserialport-cr

Windows

  1. Follow the instructions at https://github.com/neatorobito/scoop-crystal to add the crystal-preview bucket to scoop
  2. Install crystal with scoop install crystal
  3. Run .\rsrc\install.ps1 in powershell
  4. Run in powershell
$env:LIB="${env:LIB};C:\libserialport"
$env:PATH="${env:PATH};C:\libserialport"

OR

Run in cmd

set PATH=%PATH%;C:\libserialport
set LIB=%LIB%;C:\libserialport

Usage

For usage, see the 1 to 1 examples recreated from libserialport.

Contributing

  1. Fork it (https://github.com/your-github-user/libserialport-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

libserialport-cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • 7 months ago
  • April 13, 2024
License

MIT License

Links
Synced at

Fri, 22 Nov 2024 04:50:52 GMT

Languages