Lines Matching +full:int +full:- +full:pin
5 * SPDX-License-Identifier: Apache-2.0
9 * @brief Atmel SAM0 MCU family I/O Pin Controller (PORT)
16 int soc_port_pinmux_set(PortGroup *pg, uint32_t pin, uint32_t func) in soc_port_pinmux_set() argument
18 bool is_odd = pin & 1; in soc_port_pinmux_set()
19 int idx = pin / 2U; in soc_port_pinmux_set()
22 * even numbered pin goes in the bits 0..3 and the odd in soc_port_pinmux_set()
23 * numbered pin in bits 4..7. in soc_port_pinmux_set()
26 pg->PMUX[idx].bit.PMUXO = func; in soc_port_pinmux_set()
28 pg->PMUX[idx].bit.PMUXE = func; in soc_port_pinmux_set()
30 pg->PINCFG[pin].bit.PMUXEN = 1; in soc_port_pinmux_set()
35 void soc_port_configure(const struct soc_port_pin *pin) in soc_port_configure() argument
37 PortGroup *pg = pin->regs; in soc_port_configure()
38 uint32_t flags = pin->flags; in soc_port_configure()
39 uint32_t func = (pin->flags & SOC_PORT_FUNC_MASK) >> SOC_PORT_FUNC_POS; in soc_port_configure()
43 pg->PINCFG[pin->pinum] = pincfg; in soc_port_configure()
44 pg->DIRCLR.reg = (1 << pin->pinum); in soc_port_configure()
45 pg->OUTCLR.reg = (1 << pin->pinum); in soc_port_configure()
48 soc_port_pinmux_set(pg, pin->pinum, func); in soc_port_configure()
54 pg->OUTSET.reg = (1 << pin->pinum); in soc_port_configure()
65 pg->DIRSET.reg = (1 << pin->pinum); in soc_port_configure()
72 pg->PINCFG[pin->pinum] = pincfg; in soc_port_configure()
76 unsigned int size) in soc_port_list_configure()
78 for (int i = 0; i < size; i++) { in soc_port_list_configure()