Low-level driver¶
-
group
LWOW_LL
Low-level device dependant functions.
-
struct
lwow_ll_drv_t
¶ - #include <lwow.h>
1-Wire low-level driver structure
Public Members
-
uint8_t (*
init
)(void *arg)¶ Initialize low-level driver.
- Return
1
on success,0
otherwise- Parameters
[in] arg
: Custom argument passed to lwow_init function
-
uint8_t (*
deinit
)(void *arg)¶ De-initialize low-level driver.
- Return
1
on success,0
otherwise- Parameters
[in] arg
: Custom argument passed to lwow_init function
-
uint8_t (*
set_baudrate
)(uint32_t baud, void *arg)¶ Set UART baudrate.
- Return
1
on success,0
otherwise- Parameters
[in] baud
: Baudrate to set in units of bauds, normally9600
or115200
[in] arg
: Custom argument passed to lwow_init function
-
uint8_t (*
tx_rx
)(const uint8_t *tx, uint8_t *rx, size_t len, void *arg)¶ Transmit and receive bytes over UART hardware (or custom implementation)
Bytes array for
tx
is already prepared to be directly transmitted over UART hardware, no data manipulation is necessary.At the same time, library must read received data on RX port and put it to
rx
data array, one by one, up tolen
number of bytes- Return
1
on success,0
otherwise- Parameters
[in] tx
: Data to transmit over UART[out] rx
: Array to write received data to[in] len
: Number of bytes to exchange[in] arg
: Custom argument passed to lwow_init function
-
uint8_t (*
-
struct