AtomVM
AtomVM copied to clipboard
Review UART API
UART driver has the following API right now:
Following general UART options are available:
name: string()
speed: integer()
data_bits: integer()
stop_bits: integer()
flow_control: [none, hardware, software]
parity: [none, even, odd]
In addition UART pins can be configured:
rx_pin: integer()
tx_pin: integer()
rts_pin: integer()
cts_pin: integer()
The following ESP32 specific option is exposed:
event_queue_len: integer()
The API should be reviewed and discussed before next release.
Proposal 1:
rx_pin -> rx
tx_pin -> tx
rts_pin -> rts
cts_pin -> cts
This follows the same approach that we are discussing for #707 and #651.
Proposal 2:
Keys such as event_queue_len should be moved to opts, so we can use opts for any platform / implementation specific detail.