MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Public Types | Public Member Functions | Public Attributes | List of all members
mip::commands_3dm::GpioConfig::PinMode Struct Reference

#include <commands_3dm.hpp>

Inheritance diagram for mip::commands_3dm::GpioConfig::PinMode:
mip::Bitfield< PinMode >

Public Types

enum  _enumType : uint8_t {
  NONE = 0x00, OPEN_DRAIN = 0x01, PULLDOWN = 0x02, PULLUP = 0x04,
  ALL = 0x07
}
 
typedef uint8_t Type
 

Public Member Functions

 PinMode ()
 
 PinMode (int val)
 
 operator uint8_t () const
 
PinModeoperator= (uint8_t val)
 
PinModeoperator= (int val)
 
PinModeoperator|= (uint8_t val)
 
PinModeoperator&= (uint8_t val)
 
bool openDrain () const
 
void openDrain (bool val)
 
bool pulldown () const
 
void pulldown (bool val)
 
bool pullup () const
 
void pullup (bool val)
 
bool allSet () const
 
void setAll ()
 

Public Attributes

uint8_t value = NONE
 

Member Typedef Documentation

◆ Type

Member Enumeration Documentation

◆ _enumType

Enumerator
NONE 
OPEN_DRAIN 

The pin will be an open-drain output. The state will be either LOW or FLOATING instead of LOW or HIGH, respectively. This is used to connect multiple open-drain outputs from several devices. An internal or external pull-up resistor is typically used in combination. The maximum voltage of an open drain output is subject to the device maximum input voltage range found in the specifications.

PULLDOWN 

The pin will have an internal pull-down resistor enabled. This is useful for connecting inputs to signals which can only be pulled high such as mechanical switches. Cannot be used in combination with pull-up. See the device specifications for the resistance value.

PULLUP 

The pin will have an internal pull-up resistor enabled. Useful for connecting inputs to signals which can only be pulled low such as mechanical switches, or in combination with an open drain output. Cannot be used in combination with pull-down. See the device specifications for the resistance value. Use of this mode may restrict the maximum allowed input voltage. See the device datasheet for details.

ALL 

Constructor & Destructor Documentation

◆ PinMode() [1/2]

mip::commands_3dm::GpioConfig::PinMode::PinMode ( )
inline

◆ PinMode() [2/2]

mip::commands_3dm::GpioConfig::PinMode::PinMode ( int  val)
inline

Member Function Documentation

◆ allSet()

bool mip::commands_3dm::GpioConfig::PinMode::allSet ( ) const
inline

◆ openDrain() [1/2]

bool mip::commands_3dm::GpioConfig::PinMode::openDrain ( ) const
inline

◆ openDrain() [2/2]

void mip::commands_3dm::GpioConfig::PinMode::openDrain ( bool  val)
inline

◆ operator uint8_t()

mip::commands_3dm::GpioConfig::PinMode::operator uint8_t ( ) const
inline

◆ operator&=()

PinMode& mip::commands_3dm::GpioConfig::PinMode::operator&= ( uint8_t  val)
inline

◆ operator=() [1/2]

PinMode& mip::commands_3dm::GpioConfig::PinMode::operator= ( int  val)
inline

◆ operator=() [2/2]

PinMode& mip::commands_3dm::GpioConfig::PinMode::operator= ( uint8_t  val)
inline

◆ operator|=()

PinMode& mip::commands_3dm::GpioConfig::PinMode::operator|= ( uint8_t  val)
inline

◆ pulldown() [1/2]

bool mip::commands_3dm::GpioConfig::PinMode::pulldown ( ) const
inline

◆ pulldown() [2/2]

void mip::commands_3dm::GpioConfig::PinMode::pulldown ( bool  val)
inline

◆ pullup() [1/2]

bool mip::commands_3dm::GpioConfig::PinMode::pullup ( ) const
inline

◆ pullup() [2/2]

void mip::commands_3dm::GpioConfig::PinMode::pullup ( bool  val)
inline

◆ setAll()

void mip::commands_3dm::GpioConfig::PinMode::setAll ( )
inline

Member Data Documentation

◆ value

uint8_t mip::commands_3dm::GpioConfig::PinMode::value = NONE

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