Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing timeout implementation from #61 and fixed #72 (missing flow-control setting in tests) #74

Merged
merged 7 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ deps/*
!deps/build.jl

Manifest.toml
docs/build/
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ julia:
- 1.4
- 1.5
- nightly
matrix:
jobs:
allow_failures:
- julia: nightly
- arch: arm64
exclude:
- os: osx
arch: x86
Expand All @@ -25,6 +26,15 @@ matrix:
arch: arm64
- julia: nightly
arch: arm64
include:
- stage: "Documentation"
julia: 1.5
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip

before_install:
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo chmod 666 /dev/tty*; fi
Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
8 changes: 8 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Documenter, LibSerialPort, LibSerialPort.Lib

makedocs(
sitename="LibSerialPort.jl",
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true"
)
)
78 changes: 78 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# LibSerialPort.jl – access serial ports

```@docs
LibSerialPort
```

# Enumerating serial ports

```@docs
list_ports
get_port_list
print_port_metadata
```

## Opening and configuring ports

```@docs
LibSerialPort.open(::AbstractString, ::Integer)
SerialPort(::AbstractString)
open(::SerialPort; ::SPMode)
close(sp::SerialPort)
set_speed
set_frame
set_flow_control
isopen(sp::SerialPort)
eof(sp::SerialPort)
seteof
get_port_settings
print_port_settings
set_read_timeout
set_write_timeout
clear_read_timeout
clear_write_timeout
sp_flush
sp_drain
sp_output_waiting
```

# Read and write methods from Base

Many of the read/write methods defined in `Base` that operate on an
object of type `IO` can also be used with objects of type
`SerialPort`. Therefore we repeat the documentation of some of these
here. (Note that some of the following docstings also refer to other
methods that are not applicable to `SerialPort`.)

```@docs
Base.read(::IO, ::Any)
Base.read!
Base.readbytes!
Base.readavailable
Base.readline
Base.readlines
Base.eachline
Base.write
Base.print(::IO, ::Any)
```

# Additional read methods

```@docs
read(::SerialPort)
nonblocking_read(::SerialPort)
bytesavailable(::SerialPort)
```

# Other references

The following are listed here only because they are referenced above:

```@docs
Base.ntoh
Base.hton
Base.ltoh
Base.htol
Base.stdout
Base.string(xs...)
```
5 changes: 5 additions & 0 deletions docs/src/wrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Low-level C API wrappers

```@autodocs
Modules = [LibSerialPort.Lib]
```
Loading