MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Classes | Typedefs | Functions
(0x0C,0x42) Gpio State

Allows the state of the pin to be read or controlled. More...

Classes

struct  mip::C::mip_3dm_gpio_state_command
 
struct  mip::C::mip_3dm_gpio_state_response
 

Typedefs

typedef struct mip_3dm_gpio_state_command mip::C::mip_3dm_gpio_state_command
 
typedef struct mip_3dm_gpio_state_response mip::C::mip_3dm_gpio_state_response
 

Functions

void mip::C::insert_mip_3dm_gpio_state_command (microstrain_serializer *serializer, const mip_3dm_gpio_state_command *self)
 
void mip::C::extract_mip_3dm_gpio_state_command (microstrain_serializer *serializer, mip_3dm_gpio_state_command *self)
 
void mip::C::insert_mip_3dm_gpio_state_response (microstrain_serializer *serializer, const mip_3dm_gpio_state_response *self)
 
void mip::C::extract_mip_3dm_gpio_state_response (microstrain_serializer *serializer, mip_3dm_gpio_state_response *self)
 
mip_cmd_result mip::C::mip_3dm_write_gpio_state (mip_interface *device, uint8_t pin, bool state)
 
mip_cmd_result mip::C::mip_3dm_read_gpio_state (mip_interface *device, uint8_t pin, bool *state_out)
 

Detailed Description

Allows the state of the pin to be read or controlled.

This command serves two purposes: 1) To allow reading the state of a pin via command, rather than polling a data quantity, and 2) to provide a way to set the output state without also having to specify the operating mode.

The state read back from the pin is the physical state of the pin, rather than a configuration value. The state can be read regardless of its configuration as long as the device supports GPIO input on that pin. If the pin is set to an output, the read value would match the output value.

While the state of a pin can always be set, it will only have an observable effect if the pin is set to output mode.

This command does not support saving, loading, or resetting the state. Instead, use the GPIO Configuration command, which allows the initial state to be configured.

Typedef Documentation

◆ mip_3dm_gpio_state_command

◆ mip_3dm_gpio_state_response

Function Documentation

◆ extract_mip_3dm_gpio_state_command()

void mip::C::extract_mip_3dm_gpio_state_command ( microstrain_serializer serializer,
mip_3dm_gpio_state_command self 
)

◆ extract_mip_3dm_gpio_state_response()

void mip::C::extract_mip_3dm_gpio_state_response ( microstrain_serializer serializer,
mip_3dm_gpio_state_response self 
)

◆ insert_mip_3dm_gpio_state_command()

void mip::C::insert_mip_3dm_gpio_state_command ( microstrain_serializer serializer,
const mip_3dm_gpio_state_command self 
)

◆ insert_mip_3dm_gpio_state_response()

void mip::C::insert_mip_3dm_gpio_state_response ( microstrain_serializer serializer,
const mip_3dm_gpio_state_response self 
)

◆ mip_3dm_read_gpio_state()

mip_cmd_result mip::C::mip_3dm_read_gpio_state ( mip_interface device,
uint8_t  pin,
bool *  state_out 
)

◆ mip_3dm_write_gpio_state()

mip_cmd_result mip::C::mip_3dm_write_gpio_state ( mip_interface device,
uint8_t  pin,
bool  state 
)