24 #if HAL_USE_I2C == TRUE || HAL_USE_SPI == TRUE 42 for (callback = binfo->
callbacks; callback; callback = callback->
next) {
56 uint64_t next_needed = 0;
59 for (callback = binfo->
callbacks; callback; callback = callback->
next) {
60 if (next_needed == 0 ||
63 if (next_needed < now) {
70 uint32_t
delay = 50000;
71 if (next_needed >= now && next_needed - now < delay) {
72 delay = next_needed - now;
91 const uint8_t name_len = 7;
108 THD_WORKING_AREA_SIZE(1024),
115 if (callback ==
nullptr) {
151 uint8_t *&buf_rx, uint16_t rx_len)
202 #endif // HAL_USE_I2C || HAL_USE_SPI struct ChibiOS::DeviceBus::callback_info * callbacks
uint16_t bounce_buffer_tx_size
void bouncebuffer_setup(const uint8_t *&buf_tx, uint16_t tx_len, uint8_t *&buf_rx, uint16_t rx_len)
#define HAL_SEMAPHORE_BLOCK_FOREVER
virtual void free_type(void *ptr, size_t size, Memory_Type mem_type)
uint8_t bus_num(void) const
enum BusType bus_type(void) const
uint8_t * bounce_buffer_rx
static void bus_thread(void *arg)
bool take(uint32_t timeout_ms)
uint8_t * bounce_buffer_tx
void * malloc(size_t size)
virtual void * malloc_type(size_t size, Memory_Type mem_type)
void bouncebuffer_setup_tx(const uint8_t *&buf_tx, uint16_t tx_len)
virtual void delay_microseconds(uint16_t us)=0
AP_HAL::Device::PeriodicHandle register_periodic_callback(uint32_t period_usec, AP_HAL::Device::PeriodicCb, AP_HAL::Device *hal_device)
uint16_t bounce_buffer_rx_size
int snprintf(char *str, size_t size, const char *fmt,...)
bool adjust_timer(AP_HAL::Device::PeriodicHandle h, uint32_t period_usec)
AP_HAL::Device::PeriodicCb cb
void bouncebuffer_setup_rx(uint8_t *&buf_rx, uint16_t rx_len)
#define IS_DMA_SAFE(addr)
void panic(const char *errormsg,...) FMT_PRINTF(1
struct callback_info * next
static const AP_HAL::HAL & hal
AP_HAL::Device * hal_device
void bouncebuffer_rx_copy(uint8_t *buf_rx, uint16_t rx_len)
AP_HAL::Scheduler * scheduler