libeasymcp2221 2.0.3
Public Attributes | List of all members
mcp2221_sram_gp_config_t Struct Reference

SRAM configuration for one MCP2221 GP pin. More...

#include <mcp2221_sram.h>

Public Attributes

int value
 GPIO output value. More...
 
int direction
 GPIO direction. More...
 
int function
 Pin-function selector. More...
 

Detailed Description

SRAM configuration for one MCP2221 GP pin.

The three fields correspond to the output value, GPIO direction, and pin function encoded in the MCP2221 GP SRAM byte. Each field can be changed independently or preserved with MCP2221_CONFIG_KEEP.

Definition at line 33 of file mcp2221_sram.h.

Member Data Documentation

◆ direction

int mcp2221_sram_gp_config_t::direction

GPIO direction.

Use MCP2221_DIR_OUTPUT (0), MCP2221_DIR_INPUT (1), or MCP2221_CONFIG_KEEP.

Definition at line 48 of file mcp2221_sram.h.

◆ function

int mcp2221_sram_gp_config_t::function

Pin-function selector.

Use an MCP2221_GPIO_FUNC_* value valid for the corresponding GP pin, or MCP2221_CONFIG_KEEP. Supported selectors are:

  • GP0: GPIO, DEDICATED, ALT_0
  • GP1: GPIO, DEDICATED, ALT_0, ALT_1, ALT_2
  • GP2: GPIO, DEDICATED, ALT_0, ALT_1
  • GP3: GPIO, DEDICATED, ALT_0, ALT_1

Definition at line 60 of file mcp2221_sram.h.

◆ value

int mcp2221_sram_gp_config_t::value

GPIO output value.

Use 0 for low, 1 for high, or MCP2221_CONFIG_KEEP to preserve the current value.

Definition at line 40 of file mcp2221_sram.h.


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