Lines Matching +full:slow +full:- +full:clock +full:- +full:div
2 * Copyright (c) 2016-2017 Piotr Mienkowski
4 * SPDX-License-Identifier: Apache-2.0
101 * - configure pin(s) as input with debounce filter enabled.
102 * - connect pin(s) to a peripheral B and enable pull-up.
103 * - configure pin(s) as open drain output.
106 * @remark The function will enable the GPIO module's clock only if
108 * a user wants. A pin will function correctly without clock enabled
111 * a pull-up and user wants to read pin's input value it is necessary
112 * to enable GPIO module's clock separately.
143 pin->regs->OVRS = pin->mask; in soc_gpio_set()
145 pin->regs->PIO_SODR = pin->mask; in soc_gpio_set()
161 pin->regs->OVRC = pin->mask; in soc_gpio_clear()
163 pin->regs->PIO_CODR = pin->mask; in soc_gpio_clear()
179 return pin->regs->PVR & pin->mask; in soc_gpio_get()
181 return pin->regs->PIO_PDSR & pin->mask; in soc_gpio_get()
189 * than 1/2 programmable divided slow clock period tdiv_slck, while a pulse with
191 * between 1/2 selected clock cycle and one tdiv_slck clock cycle, the pulse may
195 * tdiv_slck = ((div + 1) x 2) x tslck
196 * where tslck is the slow clock, typically 32.768 kHz.
202 * @param div slow clock divider, valid values: from 0 to 2^14 - 1
205 uint32_t div) in soc_gpio_debounce_length_set() argument
208 if (div) { in soc_gpio_debounce_length_set()
209 pin->regs->STERS = pin->mask; in soc_gpio_debounce_length_set()
211 pin->regs->STERC = pin->mask; in soc_gpio_debounce_length_set()
214 pin->regs->PIO_SCDR = PIO_SCDR_DIV(div); in soc_gpio_debounce_length_set()