SaturnRingLibrary 0.7
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::Input::Management Class Reference

Detailed Description

Peripheral management.

#include <srl_input.hpp>

Static Public Member Functions

static uint8_t FindNthConnectedPeripheral (const uint8_t &index)
 Find port number of nth connected peripheral.
 
static PeripheralFamily GetFamily (const uint8_t &port)
 Gets connected peripheral type family to specified port.
 
static PerDigital * GetRawData (const uint8_t &port)
 Get the Raw port data.
 
static PeripheralType GetType (const uint8_t &port)
 Gets connected peripheral type to specified port.
 
static bool IsConnected (const uint8_t &port)
 Checks whether any peripheral is connected to specified port.
 
static void RefreshPeripherals ()
 Refresh peripherals.
 

Static Public Attributes

static const uint8_t MaxPeripherals = 12
 Maximal number of connected devices.
 

Member Function Documentation

◆ FindNthConnectedPeripheral()

static uint8_t SRL::Input::Management::FindNthConnectedPeripheral ( const uint8_t & index)
inlinestatic

Find port number of nth connected peripheral.

Parameters
indexIndex of the peripheral
Returns
Port number of connected peripheral or 0xff if none

◆ GetFamily()

static PeripheralFamily SRL::Input::Management::GetFamily ( const uint8_t & port)
inlinestatic

Gets connected peripheral type family to specified port.

Parameters
portPeripheral port
Returns
Peripheral type family

◆ GetRawData()

static PerDigital * SRL::Input::Management::GetRawData ( const uint8_t & port)
inlinestatic

Get the Raw port data.

Parameters
portPort index
Returns
Port data

◆ GetType()

static PeripheralType SRL::Input::Management::GetType ( const uint8_t & port)
inlinestatic

Gets connected peripheral type to specified port.

Parameters
portPeripheral port
Returns
Peripheral type

◆ IsConnected()

static bool SRL::Input::Management::IsConnected ( const uint8_t & port)
inlinestatic

Checks whether any peripheral is connected to specified port.

Parameters
portPeripheral port
Returns
true if peripheral is present

◆ RefreshPeripherals()

static void SRL::Input::Management::RefreshPeripherals ( )
inlinestatic

Refresh peripherals.

Note
For internal use only