Microchip® Advanced Software Framework

pinmux.c File Reference

SAM Pin Multiplexer Driver.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <pinmux.h>

Functions

static void _system_pinmux_config (PortGroup *const port, const uint32_t pin_mask, const struct system_pinmux_config *const config)
 
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...
 
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...
 
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...
 

static void _system_pinmux_config ( PortGroup *const  port,
const uint32_t  pin_mask,
const struct system_pinmux_config *const  config 
)
static

Writes out a given configuration of a Port pin configuration to the hardware module.

Note
If the pin direction is set as an output, the pull-up/pull-down input configuration setting is ignored.
Parameters
[in]portBase of the PORT module to configure
[in]pin_maskMask of the port pin to configure
[in]configConfiguration settings for the pin

References Assert, system_pinmux_config::direction, system_pinmux_config::input_pull, system_pinmux_config::mux_position, system_pinmux_config::powersave, SYSTEM_PINMUX_GPIO, SYSTEM_PINMUX_PIN_DIR_INPUT, SYSTEM_PINMUX_PIN_DIR_OUTPUT, SYSTEM_PINMUX_PIN_DIR_OUTPUT_WITH_READBACK, SYSTEM_PINMUX_PIN_PULL_NONE, and SYSTEM_PINMUX_PIN_PULL_UP.

Referenced by system_pinmux_group_set_config(), and system_pinmux_pin_set_config().