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

Fix: Unable to read data on windows. Fixes #29 #94

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Commits on Feb 23, 2022

  1. Restructure into stdlib like "sys" mod for impl.

    Change SerialPort to a struct, and move the implementation to a "sys"
    module which selects between different possible "real" implementations.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    295b329 View commit details
    Browse the repository at this point in the history
  2. Move posix-specific features to an extension.

    Add a public posix module containing a posix-specific SerialPortExt
    trait and the BreakDuration type.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    1c66f32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    09174fc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    16bcb54 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7f82827 View commit details
    Browse the repository at this point in the history
  6. Fix for windows build.

    Get the windows build working. Remove the windows-specific extensions
    module because windows doesn't have any methods not available on posix.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    c2982c1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3b04ade View commit details
    Browse the repository at this point in the history
  8. Use as_ref with manual deref instead of as_deref.

    One of the CI toolchains uses an older version of rustc, which doesn't
    include as_deref, so we just do the same thing that as_deref does
    internally.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    5cdd829 View commit details
    Browse the repository at this point in the history
  9. Move impl of SerialPortExt to the posix ext mod.

    Implementing the extension in the posix extension mod ensures it will
    appear in documentation even if documentation is built on windows, since
    that mod is cfg(doc).
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    12c41be View commit details
    Browse the repository at this point in the history
  10. Add timeouts to the new API.

    Current timeouts are based on
    [this comment from !78](https://gitlab.com/susurrus/serialport-rs/-/merge_requests/78#note_343695538),
    copying the windows timeout settings needed to get posix-like timeout
    behavior. That is, reads should return available data ASAP regardless of
    timeouts, but stop early when there is a timeout.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    32612b8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a80f33d View commit details
    Browse the repository at this point in the history
  12. Fix formatting (cargo fmt).

    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    5923ec0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    934539e View commit details
    Browse the repository at this point in the history
  14. Add EventCache for win event HANDLEs.

    EventCache will hold the HANDLE for a read/write when not in use or will
    produce a new handle for each thread when multiple threads try to
    read/write at the same time. The cache holds a single value and will
    deallocate extra handles when there is already a handle stored. We have
    one cache for a read_handle and one cache for a write_handle.
    
    The expectation is that in the normal case, at most one thread will be
    reading/writing at a time, and so at most one handle will be created for
    each of read and write. But in abnormal cases, when multiple threads try
    to read/write at the same time, we auto-create and auto-close extra
    handles as needed.
    
    Fix the into_raw_handle/into_raw_fd to drop other fields that were
    previously leaked.
    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    bb0becd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6d83eca View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    cfda6e0 View commit details
    Browse the repository at this point in the history
  17. Don't close NULL handles.

    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    ffd958b View commit details
    Browse the repository at this point in the history
  18. Update documentation for v5.

    zstewar1 committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    4d3a17f View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Configuration menu
    Copy the full SHA
    310ab9c View commit details
    Browse the repository at this point in the history