LoRaWANCH341 Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SPIFactory Class Reference

Factory class for creating SPI interfaces. More...

#include <SPIInterface.hpp>

Collaboration diagram for SPIFactory:
Collaboration graph

Public Member Functions

 ~SPIFactory ()=default
 

Static Public Member Functions

static std::unique_ptr< SPIInterfacecreateCH341SPI (int device_index=0, bool lsb_first=false)
 
static std::unique_ptr< SPIInterfacecreateLinuxSPI (const std::string &device=std::string("/dev/spidev0.0"), uint32_t speed=1000000, uint8_t mode=0)
 
static std::unique_ptr< SPIInterfacecreateSPIInterface (const std::string &device_type, int device_index=0, bool lsb_first=false)
 
static void cleanupResources ()
 

Detailed Description

Factory class for creating SPI interfaces.

This class provides factory methods for creating SPI interfaces, allowing the user to select the desired SPI implementation.

Constructor & Destructor Documentation

◆ ~SPIFactory()

SPIFactory::~SPIFactory ( )
default

Member Function Documentation

◆ cleanupResources()

static void SPIFactory::cleanupResources ( )
static

◆ createCH341SPI()

std::unique_ptr< SPIInterface > SPIFactory::createCH341SPI ( int  device_index = 0,
bool  lsb_first = false 
)
static
Here is the caller graph for this function:

◆ createLinuxSPI()

std::unique_ptr< SPIInterface > SPIFactory::createLinuxSPI ( const std::string &  device = std::string("/dev/spidev0.0"),
uint32_t  speed = 1000000,
uint8_t  mode = 0 
)
static
Here is the caller graph for this function:

◆ createSPIInterface()

static std::unique_ptr< SPIInterface > SPIFactory::createSPIInterface ( const std::string &  device_type,
int  device_index = 0,
bool  lsb_first = false 
)
static

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