<commit_before>Todo list

  1. Add support for setting break, cts, rts, etc.
  1. Fix race condition between active mode and changing configurations
  1. Add protocol parser support so that receive events can be chopped up by
     line or by some other marker. This needs a slight amount of thought, since
     we also need to slice by timeouts (e.g., read in 32 byte chunks unless a
     partial one hangs around for too long). If we support returning things
     other than binaries, then it seems reasonable to expect the send side
     to translate. Also need to handle flush and drain.
  2. Add tests for different baudrate and parity configs
  3. Add tests for setting baudrate and flow control dynamically
  4. Add a read_exact call to block until exactly n bytes are read
     or there's a timeout.
  5. Fix the error code on Windows when you unplug the USB cable to
     be :eio. The error code that comes from ReadFile, etc. seems
     useless.
  5. It seems like a use case would be to have one Erlang process writing continuously
     and another one reading continuously on the same uart. Currently each one can block the other. It seems desirable to have separate read and write queues and allow
     one read and one write to be pending simultaneously in the C code.
  6. Clean up error reporting code. Pass back errno values and convert in platform independent code?
  7. Active mode could support flow control if we add pause and resume calls. This could be emulated by
     turning the active mode off for pause and back on for resume. This feels really manual, but
     node-serialport does it this way.
  8. The options get passed through to C code untouched. Consider return {:error, :einval} rather than
     crashing the process, since without debug on, it's hard to figure out what happened.
  9. See if undefining UNICODE on Windows is safe. Maybe a lot of sketchy UTF-16 to UTF-8 code
     can be removed? ** Basic tests suggest that this will work**
  10. What should be done if `open` is called multiple times. Currently, it re-opens, but
      it could fail, or it could check if the port is the same and just do a configure.
      Be sure to add
  11. Should start_link let you open a port automatically? This is nice on Nerves where
      you're guaranteed that the port exists usually, but not so much on the Desktop where
      ports are fickle.
<commit_msg>Remove a few completed items from TODO<commit_after>Todo list

  1. Add protocol parser support so that receive events can be chopped up by
     line or by some other marker. This needs a slight amount of thought, since
     we also need to slice by timeouts (e.g., read in 32 byte chunks unless a
     partial one hangs around for too long). If we support returning things
     other than binaries, then it seems reasonable to expect the send side
     to translate. Also need to handle flush and drain.
  2. Add tests for different baudrate and parity configs
  3. Add tests for setting baudrate and flow control dynamically
  4. Add a read_exact call to block until exactly n bytes are read
     or there's a timeout.
  5. Fix the error code on Windows when you unplug the USB cable to
     be :eio. The error code that comes from ReadFile, etc. seems
     useless.
  5. It seems like a use case would be to have one Erlang process writing continuously
     and another one reading continuously on the same uart. Currently each one can block the other. It seems desirable to have separate read and write queues and allow
     one read and one write to be pending simultaneously in the C code.
  6. Clean up error reporting code. Pass back errno values and convert in platform independent code?
  7. Active mode could support flow control if we add pause and resume calls. This could be emulated by
     turning the active mode off for pause and back on for resume. This feels really manual, but
     node-serialport does it this way.
  9. See if undefining UNICODE on Windows is safe. Maybe a lot of sketchy UTF-16 to UTF-8 code
     can be removed? ** Basic tests suggest that this will work**
  10. What should be done if `open` is called multiple times. Currently, it re-opens, but
      it could fail, or it could check if the port is the same and just do a configure.
      Be sure to add
  11. Should start_link let you open a port automatically? This is nice on Nerves where
      you're guaranteed that the port exists usually, but not so much on the Desktop where
      ports are fickle.

{'fraction_non_alphanumeric': 0.03139612558450234, 'fraction_numerical': 0.008684034736138945, 'mean_word_length': 3.178604651162791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5018892', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1094, 'n_words': 759}