APM:Libraries
|
#include <Device.h>
Classes | |
struct | callback_info |
Public Member Functions | |
DeviceBus (uint8_t _thread_priority=APM_I2C_PRIORITY) | |
AP_HAL::Device::PeriodicHandle | register_periodic_callback (uint32_t period_usec, AP_HAL::Device::PeriodicCb, AP_HAL::Device *hal_device) |
bool | adjust_timer (AP_HAL::Device::PeriodicHandle h, uint32_t period_usec) |
void | bouncebuffer_setup (const uint8_t *&buf_tx, uint16_t tx_len, uint8_t *&buf_rx, uint16_t rx_len) |
void | bouncebuffer_setup_tx (const uint8_t *&buf_tx, uint16_t tx_len) |
void | bouncebuffer_setup_rx (uint8_t *&buf_rx, uint16_t rx_len) |
void | bouncebuffer_rx_copy (uint8_t *buf_rx, uint16_t rx_len) |
Static Public Member Functions | |
static void | bus_thread (void *arg) |
Public Attributes | |
struct DeviceBus * | next |
Semaphore | semaphore |
Shared_DMA * | dma_handle |
Private Attributes | |
struct ChibiOS::DeviceBus::callback_info * | callbacks |
uint8_t | thread_priority |
thread_t * | thread_ctx |
bool | thread_started |
AP_HAL::Device * | hal_device |
uint8_t * | bounce_buffer_tx |
uint8_t * | bounce_buffer_rx |
uint16_t | bounce_buffer_tx_size |
uint16_t | bounce_buffer_rx_size |
|
inline |
bool DeviceBus::adjust_timer | ( | AP_HAL::Device::PeriodicHandle | h, |
uint32_t | period_usec | ||
) |
Definition at line 133 of file Device.cpp.
Referenced by ChibiOS::I2CDevice::adjust_periodic_callback(), and ChibiOS::SPIDevice::adjust_periodic_callback().
void DeviceBus::bouncebuffer_rx_copy | ( | uint8_t * | buf_rx, |
uint16_t | rx_len | ||
) |
Definition at line 197 of file Device.cpp.
void DeviceBus::bouncebuffer_setup | ( | const uint8_t *& | buf_tx, |
uint16_t | tx_len, | ||
uint8_t *& | buf_rx, | ||
uint16_t | rx_len | ||
) |
Definition at line 150 of file Device.cpp.
Referenced by ChibiOS::I2CDevice::_transfer(), and ChibiOS::SPIDevice::do_transfer().
void DeviceBus::bouncebuffer_setup_rx | ( | uint8_t *& | buf_rx, |
uint16_t | rx_len | ||
) |
Definition at line 176 of file Device.cpp.
Referenced by bouncebuffer_setup().
void DeviceBus::bouncebuffer_setup_tx | ( | const uint8_t *& | buf_tx, |
uint16_t | tx_len | ||
) |
Definition at line 157 of file Device.cpp.
Referenced by bouncebuffer_setup().
|
static |
Definition at line 33 of file Device.cpp.
Referenced by register_periodic_callback().
AP_HAL::Device::PeriodicHandle DeviceBus::register_periodic_callback | ( | uint32_t | period_usec, |
AP_HAL::Device::PeriodicCb | cb, | ||
AP_HAL::Device * | hal_device | ||
) |
Definition at line 84 of file Device.cpp.
Referenced by ChibiOS::I2CDevice::register_periodic_callback(), ChibiOS::SPIDevice::register_periodic_callback(), and ChibiOS::I2CDevice::set_speed().
|
private |
Definition at line 61 of file Device.h.
Referenced by bouncebuffer_rx_copy(), and bouncebuffer_setup_rx().
|
private |
Definition at line 63 of file Device.h.
Referenced by bouncebuffer_setup_rx().
|
private |
Definition at line 60 of file Device.h.
Referenced by bouncebuffer_setup_tx().
|
private |
Definition at line 62 of file Device.h.
Referenced by bouncebuffer_setup_tx().
|
private |
Referenced by bus_thread(), and register_periodic_callback().
Shared_DMA* ChibiOS::DeviceBus::dma_handle |
Definition at line 32 of file Device.h.
Referenced by ChibiOS::SPIDevice::acquire_bus(), ChibiOS::SPIBus::SPIBus(), and ChibiOS::I2CDevice::transfer().
|
private |
Definition at line 57 of file Device.h.
Referenced by register_periodic_callback().
struct DeviceBus* ChibiOS::DeviceBus::next |
Definition at line 30 of file Device.h.
Referenced by ChibiOS::SPIDeviceManager::get_device().
Semaphore ChibiOS::DeviceBus::semaphore |
Definition at line 31 of file Device.h.
Referenced by ChibiOS::SPIDevice::acquire_bus(), bus_thread(), ChibiOS::SPIDevice::clock_pulse(), ChibiOS::SPIDevice::get_semaphore(), ChibiOS::I2CDevice::transfer(), ChibiOS::SPIDevice::transfer(), and ChibiOS::SPIDevice::transfer_fullduplex().
|
private |
Definition at line 55 of file Device.h.
Referenced by adjust_timer(), and register_periodic_callback().
|
private |
Definition at line 54 of file Device.h.
Referenced by register_periodic_callback().
|
private |
Definition at line 56 of file Device.h.
Referenced by register_periodic_callback().