APM:Libraries
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
Linux::SPIDeviceManager Class Reference

#include <SPIDevice.h>

Inheritance diagram for Linux::SPIDeviceManager:
[legend]
Collaboration diagram for Linux::SPIDeviceManager:
[legend]

Public Member Functions

 SPIDeviceManager ()
 
AP_HAL::OwnPtr< AP_HAL::SPIDeviceget_device (const char *name)
 
void teardown ()
 
uint8_t get_count ()
 
const char * get_device_name (uint8_t idx)
 

Static Public Member Functions

static SPIDeviceManagerfrom (AP_HAL::SPIDeviceManager *spi_mgr)
 

Protected Member Functions

void _unregister (SPIBus &b)
 
AP_HAL::OwnPtr< AP_HAL::SPIDevice_create_device (SPIBus &b, SPIDesc &device_desc) const
 

Protected Attributes

std::vector< SPIBus * > _buses
 

Static Protected Attributes

static const uint8_t _n_device_desc = LINUX_SPI_DEVICE_NUM_DEVICES
 
static SPIDesc _device []
 

Friends

class SPIDevice
 

Detailed Description

Definition at line 77 of file SPIDevice.h.

Constructor & Destructor Documentation

◆ SPIDeviceManager()

Linux::SPIDeviceManager::SPIDeviceManager ( )
inline

Definition at line 86 of file SPIDevice.h.

Here is the call graph for this function:

Member Function Documentation

◆ _create_device()

AP_HAL::OwnPtr< AP_HAL::SPIDevice > Linux::SPIDeviceManager::_create_device ( SPIBus b,
SPIDesc device_desc 
) const
protected

Definition at line 484 of file SPIDevice.cpp.

Here is the call graph for this function:

◆ _unregister()

void Linux::SPIDeviceManager::_unregister ( SPIBus b)
protected

Definition at line 494 of file SPIDevice.cpp.

Referenced by Linux::SPIDevice::~SPIDevice().

Here is the caller graph for this function:

◆ from()

static SPIDeviceManager* Linux::SPIDeviceManager::from ( AP_HAL::SPIDeviceManager spi_mgr)
inlinestatic

Definition at line 81 of file SPIDevice.h.

Referenced by Linux::SPIDevice::~SPIDevice().

Here is the caller graph for this function:

◆ get_count()

uint8_t Linux::SPIDeviceManager::get_count ( void  )
virtual

Reimplemented from AP_HAL::SPIDeviceManager.

Definition at line 473 of file SPIDevice.cpp.

◆ get_device()

AP_HAL::OwnPtr< AP_HAL::SPIDevice > Linux::SPIDeviceManager::get_device ( const char *  name)
virtual

Reimplemented from AP_HAL::SPIDeviceManager.

Definition at line 432 of file SPIDevice.cpp.

Here is the call graph for this function:

◆ get_device_name()

const char * Linux::SPIDeviceManager::get_device_name ( uint8_t  idx)
virtual

Reimplemented from AP_HAL::SPIDeviceManager.

Definition at line 477 of file SPIDevice.cpp.

◆ teardown()

void Linux::SPIDeviceManager::teardown ( )

Definition at line 509 of file SPIDevice.cpp.

Friends And Related Function Documentation

◆ SPIDevice

friend class SPIDevice
friend

Definition at line 79 of file SPIDevice.h.

Member Data Documentation

◆ _buses

std::vector<SPIBus*> Linux::SPIDeviceManager::_buses
protected

Definition at line 112 of file SPIDevice.h.

◆ _device

SPIDesc Linux::SPIDeviceManager::_device
staticprotected
Initial value:
= {
SPIDesc("lsm9ds0_am", 1, 0, SPI_MODE_3, 8, BBB_P9_17, 10*MHZ,10*MHZ),
SPIDesc("lsm9ds0_g", 1, 0, SPI_MODE_3, 8, BBB_P8_9, 10*MHZ,10*MHZ),
SPIDesc("ms5611", 2, 0, SPI_MODE_3, 8, BBB_P9_42, 10*MHZ,10*MHZ),
SPIDesc("mpu6000", 2, 0, SPI_MODE_3, 8, BBB_P9_28, 500*1000, 20*MHZ),
SPIDesc("mpu9250", 2, 0, SPI_MODE_3, 8, BBB_P9_23, 1*MHZ, 11*MHZ),
}

Definition at line 115 of file SPIDevice.h.

◆ _n_device_desc

const uint8_t Linux::SPIDeviceManager::_n_device_desc = LINUX_SPI_DEVICE_NUM_DEVICES
staticprotected

Definition at line 114 of file SPIDevice.h.


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