MIP SDK  0.0.1
MicroStrain Communications Library for embedded systems
Classes | Functions
(0x0C,0x41) Gpio Config [CPP]
Collaboration diagram for (0x0C,0x41) Gpio Config [CPP]:

Classes

struct  mip::commands_3dm::GpioConfig
 

Functions

void mip::commands_3dm::insert (Serializer &serializer, const GpioConfig &self)
 
void mip::commands_3dm::extract (Serializer &serializer, GpioConfig &self)
 
void mip::commands_3dm::insert (Serializer &serializer, const GpioConfig::Response &self)
 
void mip::commands_3dm::extract (Serializer &serializer, GpioConfig::Response &self)
 
CmdResult mip::commands_3dm::writeGpioConfig (C::mip_interface &device, uint8_t pin, GpioConfig::Feature feature, GpioConfig::Behavior behavior, GpioConfig::PinMode pinMode)
 
CmdResult mip::commands_3dm::readGpioConfig (C::mip_interface &device, uint8_t pin, GpioConfig::Feature *featureOut, GpioConfig::Behavior *behaviorOut, GpioConfig::PinMode *pinModeOut)
 
CmdResult mip::commands_3dm::saveGpioConfig (C::mip_interface &device, uint8_t pin)
 
CmdResult mip::commands_3dm::loadGpioConfig (C::mip_interface &device, uint8_t pin)
 
CmdResult mip::commands_3dm::defaultGpioConfig (C::mip_interface &device, uint8_t pin)
 

Detailed Description

Configures the user GPIO pins on the connector for use with several built-in functions or for general input or output.

GPIO pins are device-dependent. Some features are only available on certain pins. Some behaviors require specific configurations. Consult the device user manual for restrictions and default settings.

To avoid glitches on GPIOs configured as an output in a mode other than GPIO, always configure the relevant function before setting up the pin with this command. Otherwise, the pin state will be undefined between this command and the one to set up the feature. For input pins, use this command first so the state is well-defined when the feature is initialized.

Some configurations can only be active on one pin at a time. If such configuration is applied to a second pin, the second one will take precedence and the original pin's configuration will be reset.

Function Documentation

◆ defaultGpioConfig()

CmdResult mip::commands_3dm::defaultGpioConfig ( C::mip_interface device,
uint8_t  pin 
)

◆ extract() [1/2]

void mip::commands_3dm::extract ( Serializer serializer,
GpioConfig self 
)

◆ extract() [2/2]

void mip::commands_3dm::extract ( Serializer serializer,
GpioConfig::Response self 
)

◆ insert() [1/2]

void mip::commands_3dm::insert ( Serializer serializer,
const GpioConfig self 
)

◆ insert() [2/2]

void mip::commands_3dm::insert ( Serializer serializer,
const GpioConfig::Response self 
)

◆ loadGpioConfig()

CmdResult mip::commands_3dm::loadGpioConfig ( C::mip_interface device,
uint8_t  pin 
)

◆ readGpioConfig()

CmdResult mip::commands_3dm::readGpioConfig ( C::mip_interface device,
uint8_t  pin,
GpioConfig::Feature featureOut,
GpioConfig::Behavior behaviorOut,
GpioConfig::PinMode pinModeOut 
)

◆ saveGpioConfig()

CmdResult mip::commands_3dm::saveGpioConfig ( C::mip_interface device,
uint8_t  pin 
)

◆ writeGpioConfig()

CmdResult mip::commands_3dm::writeGpioConfig ( C::mip_interface device,
uint8_t  pin,
GpioConfig::Feature  feature,
GpioConfig::Behavior  behavior,
GpioConfig::PinMode  pinMode 
)