28 #include "freertos/FreeRTOS.h"
31 #define BUS_PARANOIA 1
84 SemaphoreHandle_t mutex;
85 uint32_t mutex_ignore;
133 status_e (*_write)(
const struct heivs_bus_t *, uint32_t address,
const uint8_t *data,
size_t len);
134 status_e (*_writeread)(
const struct heivs_bus_t *, uint32_t address,
const uint8_t *src,
size_t src_len, uint8_t *dst,
size_t dst_len,
size_t *rlen);
status_e(* _suspend)(const struct heivs_bus_t *)
status_e bus_release(const struct heivs_bus_t *bus)
Release exclusive access to the bus.
status_e bus_resume(const struct heivs_bus_t *bus)
Resume the bus (from low power mode)
Variable part of the bus description.
libheivs configuration file
struct heivs_bus_var_t * var
status_e(* _init)(const struct heivs_bus_t *)
status_e bus_write(const struct heivs_bus_t *bus, uint32_t address, const void *data, size_t len)
Write data to the bus.
status_e(* _read)(const struct heivs_bus_t *, uint32_t address, uint8_t *data, size_t len, size_t *rlen)
status_e bus_init(const struct heivs_bus_t *bus)
initialize the bus
status_e(* _resume)(const struct heivs_bus_t *)
status_e bus_read(const struct heivs_bus_t *bus, uint32_t address, void *data, size_t len, size_t *rlen)
Resume the bus (from low power mode)
status_e bus_get(const struct heivs_bus_t *bus)
Get exclusive access to the bus.
heivs_bus_state_t
State of the bus.
status_e bus_writeread(const struct heivs_bus_t *bus, uint32_t address, const void *src, size_t src_len, void *dst, size_t dst_len, size_t *rlen)
Combined write and read data.
status_e bus_suspend(const struct heivs_bus_t *bus)
Suspend the bus (low power mode)