SAM Pin Multiplexer Driver.
Copyright (c) 2012-2020 Microchip Technology Inc. and its subsidiaries.
#include <compiler.h>
Data Structures | |
struct | system_pinmux_config |
Port pin configuration structure. More... | |
Macros | |
#define | SYSTEM_PINMUX_GPIO (1 << 7) |
Peripheral multiplexer index to select GPIO mode for a pin. More... | |
Enumerations | |
enum | system_pinmux_pin_dir { SYSTEM_PINMUX_PIN_DIR_INPUT, SYSTEM_PINMUX_PIN_DIR_OUTPUT, SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK } |
Port pin direction configuration enum. More... | |
enum | system_pinmux_pin_pull { SYSTEM_PINMUX_PIN_PULL_NONE, SYSTEM_PINMUX_PIN_PULL_UP, SYSTEM_PINMUX_PIN_PULL_DOWN } |
Port pin input pull configuration enum. More... | |
enum | system_pinmux_pin_sample { SYSTEM_PINMUX_PIN_SAMPLE_CONTINUOUS, SYSTEM_PINMUX_PIN_SAMPLE_ONDEMAND } |
Port pin digital input sampling mode enum. More... | |
Functions | |
Configuration and Initialization | |
static void | system_pinmux_get_config_defaults (struct system_pinmux_config *const config) |
Initializes a Port pin configuration structure to defaults. More... | |
void | system_pinmux_pin_set_config (const uint8_t gpio_pin, const struct system_pinmux_config *const config) |
Writes a Port pin configuration to the hardware module. More... | |
void | system_pinmux_group_set_config (PortGroup *const port, const uint32_t mask, const struct system_pinmux_config *const config) |
Writes a Port pin group configuration to the hardware module. More... | |
Special Mode Configuration (Physical Group Orientated) | |
static PortGroup * | system_pinmux_get_group_from_gpio_pin (const uint8_t gpio_pin) |
Retrieves the PORT module group instance from a given GPIO pin number. More... | |
void | system_pinmux_group_set_input_sample_mode (PortGroup *const port, const uint32_t mask, const enum system_pinmux_pin_sample mode) |
Configures the input sampling mode for a group of pins. More... | |
Special Mode Configuration (Logical Pin Orientated) | |
static uint8_t | system_pinmux_pin_get_mux_position (const uint8_t gpio_pin) |
Retrieves the currently selected MUX position of a logical pin. More... | |
static void | system_pinmux_pin_set_input_sample_mode (const uint8_t gpio_pin, const enum system_pinmux_pin_sample mode) |
Configures the input sampling mode for a GPIO pin. More... | |