APM:Libraries
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
VRBRAIN::DeviceBus Class Reference

#include <Device.h>

Inheritance diagram for VRBRAIN::DeviceBus:
[legend]
Collaboration diagram for VRBRAIN::DeviceBus:
[legend]

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)
 

Static Public Member Functions

static void * bus_thread (void *arg)
 

Public Attributes

struct DeviceBusnext
 
Semaphore semaphore
 

Private Attributes

struct VRBRAIN::DeviceBus::callback_infocallbacks
 
uint8_t thread_priority
 
pthread_t thread_ctx
 
bool thread_started
 
AP_HAL::Devicehal_device
 

Detailed Description

Definition at line 24 of file Device.h.

Constructor & Destructor Documentation

◆ DeviceBus()

VRBRAIN::DeviceBus::DeviceBus ( uint8_t  _thread_priority = APM_I2C_PRIORITY)
inline

Definition at line 26 of file Device.h.

Member Function Documentation

◆ adjust_timer()

bool VRBRAIN::DeviceBus::adjust_timer ( AP_HAL::Device::PeriodicHandle  h,
uint32_t  period_usec 
)

Definition at line 140 of file Device.cpp.

Referenced by VRBRAIN::I2CDevice::adjust_periodic_callback(), and VRBRAIN::SPIDevice::adjust_periodic_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bus_thread()

void * VRBRAIN::DeviceBus::bus_thread ( void *  arg)
static

Definition at line 34 of file Device.cpp.

Referenced by register_periodic_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_periodic_callback()

AP_HAL::Device::PeriodicHandle VRBRAIN::DeviceBus::register_periodic_callback ( uint32_t  period_usec,
AP_HAL::Device::PeriodicCb  cb,
AP_HAL::Device hal_device 
)

Definition at line 102 of file Device.cpp.

Referenced by VRBRAIN::I2CDevice::register_periodic_callback(), and VRBRAIN::SPIDevice::register_periodic_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ callbacks

struct VRBRAIN::DeviceBus::callback_info * VRBRAIN::DeviceBus::callbacks
private

◆ hal_device

AP_HAL::Device* VRBRAIN::DeviceBus::hal_device
private

Definition at line 46 of file Device.h.

Referenced by bus_thread(), and register_periodic_callback().

◆ next

struct DeviceBus* VRBRAIN::DeviceBus::next

Definition at line 29 of file Device.h.

Referenced by VRBRAIN::SPIDeviceManager::get_device().

◆ semaphore

Semaphore VRBRAIN::DeviceBus::semaphore

◆ thread_ctx

pthread_t VRBRAIN::DeviceBus::thread_ctx
private

Definition at line 44 of file Device.h.

Referenced by adjust_timer(), and register_periodic_callback().

◆ thread_priority

uint8_t VRBRAIN::DeviceBus::thread_priority
private

Definition at line 43 of file Device.h.

Referenced by register_periodic_callback().

◆ thread_started

bool VRBRAIN::DeviceBus::thread_started
private

Definition at line 45 of file Device.h.

Referenced by register_periodic_callback().


The documentation for this class was generated from the following files: