Public Types | Public Member Functions | Public Attributes | List of all members
dai::BoardConfig::GPIO Struct Reference

GPIO config. More...

#include <BoardConfig.hpp>

Public Types

enum  Direction : std::int8_t { INPUT = 0, OUTPUT = 1 }
 
enum  Drive : std::int8_t { MA_2 = 2, MA_4 = 4, MA_8 = 8, MA_12 = 12 }
 Drive strength in mA (2, 4, 8 and 12mA) More...
 
enum  Level : std::int8_t { LOW = 0, HIGH = 1 }
 
enum  Mode : std::int8_t {
  ALT_MODE_0 = 0, ALT_MODE_1, ALT_MODE_2, ALT_MODE_3,
  ALT_MODE_4, ALT_MODE_5, ALT_MODE_6, DIRECT
}
 
enum  Pull : std::int8_t { NO_PULL = 0, PULL_UP = 1, PULL_DOWN = 2, BUS_KEEPER = 3 }
 

Public Member Functions

 GPIO ()=default
 
 GPIO (Direction direction)
 
 GPIO (Direction direction, Level level)
 
 GPIO (Direction direction, Level level, Pull pull)
 
 GPIO (Direction direction, Mode mode)
 
 GPIO (Direction direction, Mode mode, Pull pull)
 

Public Attributes

Direction direction = Direction::INPUT
 
Drive drive = MA_2
 
Level level = Level::LOW
 
Mode mode = Mode::DIRECT
 
Pull pull = Pull::NO_PULL
 
bool schmitt = false
 
bool slewFast = false
 

Detailed Description

GPIO config.

Definition at line 56 of file BoardConfig.hpp.

Member Enumeration Documentation

◆ Direction

Enumerator
INPUT 
OUTPUT 

Definition at line 59 of file BoardConfig.hpp.

◆ Drive

enum dai::BoardConfig::GPIO::Drive : std::int8_t

Drive strength in mA (2, 4, 8 and 12mA)

Enumerator
MA_2 
MA_4 
MA_8 
MA_12 

Definition at line 66 of file BoardConfig.hpp.

◆ Level

enum dai::BoardConfig::GPIO::Level : std::int8_t
Enumerator
LOW 
HIGH 

Definition at line 61 of file BoardConfig.hpp.

◆ Mode

enum dai::BoardConfig::GPIO::Mode : std::int8_t
Enumerator
ALT_MODE_0 
ALT_MODE_1 
ALT_MODE_2 
ALT_MODE_3 
ALT_MODE_4 
ALT_MODE_5 
ALT_MODE_6 
DIRECT 

Definition at line 57 of file BoardConfig.hpp.

◆ Pull

enum dai::BoardConfig::GPIO::Pull : std::int8_t
Enumerator
NO_PULL 
PULL_UP 
PULL_DOWN 
BUS_KEEPER 

Definition at line 63 of file BoardConfig.hpp.

Constructor & Destructor Documentation

◆ GPIO() [1/6]

dai::BoardConfig::GPIO::GPIO ( )
default

◆ GPIO() [2/6]

dai::BoardConfig::GPIO::GPIO ( Direction  direction)
inline

Definition at line 70 of file BoardConfig.hpp.

◆ GPIO() [3/6]

dai::BoardConfig::GPIO::GPIO ( Direction  direction,
Level  level 
)
inline

Definition at line 71 of file BoardConfig.hpp.

◆ GPIO() [4/6]

dai::BoardConfig::GPIO::GPIO ( Direction  direction,
Level  level,
Pull  pull 
)
inline

Definition at line 72 of file BoardConfig.hpp.

◆ GPIO() [5/6]

dai::BoardConfig::GPIO::GPIO ( Direction  direction,
Mode  mode 
)
inline

Definition at line 73 of file BoardConfig.hpp.

◆ GPIO() [6/6]

dai::BoardConfig::GPIO::GPIO ( Direction  direction,
Mode  mode,
Pull  pull 
)
inline

Definition at line 74 of file BoardConfig.hpp.

Member Data Documentation

◆ direction

Direction dai::BoardConfig::GPIO::direction = Direction::INPUT

Definition at line 60 of file BoardConfig.hpp.

◆ drive

Drive dai::BoardConfig::GPIO::drive = MA_2

Definition at line 67 of file BoardConfig.hpp.

◆ level

Level dai::BoardConfig::GPIO::level = Level::LOW

Definition at line 62 of file BoardConfig.hpp.

◆ mode

Mode dai::BoardConfig::GPIO::mode = Mode::DIRECT

Definition at line 58 of file BoardConfig.hpp.

◆ pull

Pull dai::BoardConfig::GPIO::pull = Pull::NO_PULL

Definition at line 64 of file BoardConfig.hpp.

◆ schmitt

bool dai::BoardConfig::GPIO::schmitt = false

Definition at line 68 of file BoardConfig.hpp.

◆ slewFast

bool dai::BoardConfig::GPIO::slewFast = false

Definition at line 68 of file BoardConfig.hpp.


The documentation for this struct was generated from the following file:


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:20