MIP_SDK
v3.0.0-736-g212583cf
MicroStrain Communications Library for embedded systems
|
Configures the user GPIO pins on the connector for use with several built-in functions or for general input or output. More...
Classes | |
struct | mip::C::mip_3dm_gpio_config_command |
struct | mip::C::mip_3dm_gpio_config_response |
Typedefs | |
typedef enum mip_3dm_gpio_config_command_feature | mip::C::mip_3dm_gpio_config_command_feature |
typedef enum mip_3dm_gpio_config_command_behavior | mip::C::mip_3dm_gpio_config_command_behavior |
typedef uint8_t | mip::C::mip_3dm_gpio_config_command_pin_mode |
typedef struct mip_3dm_gpio_config_command | mip::C::mip_3dm_gpio_config_command |
typedef struct mip_3dm_gpio_config_response | mip::C::mip_3dm_gpio_config_response |
Variables | |
static const mip_3dm_gpio_config_command_pin_mode | mip::C::MIP_3DM_GPIO_CONFIG_COMMAND_PIN_MODE_NONE = 0x00 |
static const mip_3dm_gpio_config_command_pin_mode | mip::C::MIP_3DM_GPIO_CONFIG_COMMAND_PIN_MODE_OPEN_DRAIN = 0x01 |
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. More... | |
static const mip_3dm_gpio_config_command_pin_mode | mip::C::MIP_3DM_GPIO_CONFIG_COMMAND_PIN_MODE_PULLDOWN = 0x02 |
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. More... | |
static const mip_3dm_gpio_config_command_pin_mode | mip::C::MIP_3DM_GPIO_CONFIG_COMMAND_PIN_MODE_PULLUP = 0x04 |
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. More... | |
static const mip_3dm_gpio_config_command_pin_mode | mip::C::MIP_3DM_GPIO_CONFIG_COMMAND_PIN_MODE_ALL = 0x07 |
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.
typedef uint8_t mip::C::mip_3dm_gpio_config_command_pin_mode |
typedef struct mip_3dm_gpio_config_command mip::C::mip_3dm_gpio_config_command |
typedef struct mip_3dm_gpio_config_response mip::C::mip_3dm_gpio_config_response |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void mip::C::insert_mip_3dm_gpio_config_command | ( | microstrain_serializer * | serializer, |
const mip_3dm_gpio_config_command * | self | ||
) |
void mip::C::extract_mip_3dm_gpio_config_command | ( | microstrain_serializer * | serializer, |
mip_3dm_gpio_config_command * | self | ||
) |
void mip::C::insert_mip_3dm_gpio_config_response | ( | microstrain_serializer * | serializer, |
const mip_3dm_gpio_config_response * | self | ||
) |
void mip::C::extract_mip_3dm_gpio_config_response | ( | microstrain_serializer * | serializer, |
mip_3dm_gpio_config_response * | self | ||
) |
mip_cmd_result mip::C::mip_3dm_write_gpio_config | ( | mip_interface * | device, |
uint8_t | pin, | ||
mip_3dm_gpio_config_command_feature | feature, | ||
mip_3dm_gpio_config_command_behavior | behavior, | ||
mip_3dm_gpio_config_command_pin_mode | pin_mode | ||
) |
mip_cmd_result mip::C::mip_3dm_read_gpio_config | ( | mip_interface * | device, |
uint8_t | pin, | ||
mip_3dm_gpio_config_command_feature * | feature_out, | ||
mip_3dm_gpio_config_command_behavior * | behavior_out, | ||
mip_3dm_gpio_config_command_pin_mode * | pin_mode_out | ||
) |
mip_cmd_result mip::C::mip_3dm_save_gpio_config | ( | mip_interface * | device, |
uint8_t | pin | ||
) |
mip_cmd_result mip::C::mip_3dm_load_gpio_config | ( | mip_interface * | device, |
uint8_t | pin | ||
) |
mip_cmd_result mip::C::mip_3dm_default_gpio_config | ( | mip_interface * | device, |
uint8_t | pin | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |