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.
- Parameters
arg – [in] Custom argument passed to lwow_init function
- Returns
1
on success,0
otherwise
-
uint8_t (*deinit)(void *arg)¶
De-initialize low-level driver.
- Parameters
arg – [in] Custom argument passed to lwow_init function
- Returns
1
on success,0
otherwise
-
uint8_t (*set_baudrate)(uint32_t baud, void *arg)¶
Set UART baudrate.
- Parameters
baud – [in] Baudrate to set in units of bauds, normally
9600
or115200
arg – [in] Custom argument passed to lwow_init function
- Returns
1
on success,0
otherwise
-
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- Parameters
tx – [in] Data to transmit over UART
rx – [out] Array to write received data to
len – [in] Number of bytes to exchange
arg – [in] Custom argument passed to lwow_init function
- Returns
1
on success,0
otherwise
-
uint8_t (*init)(void *arg)¶
-
struct lwow_ll_drv_t¶