mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-21 00:58:10 -07:00
pulse_reader: add call to set GPIO pull direction
This commit is contained in:
committed by
Tiernan Messmer
parent
67b02b7785
commit
f08c8d6a1d
@@ -41,6 +41,7 @@ typedef struct {
|
||||
uint32_t bit_time;
|
||||
uint32_t dma_channel;
|
||||
const GpioPin* gpio;
|
||||
GpioPull pull;
|
||||
LL_DMA_InitTypeDef dma_config_timer;
|
||||
LL_DMA_InitTypeDef dma_config_gpio;
|
||||
} PulseReader;
|
||||
@@ -125,6 +126,16 @@ void pulse_reader_set_timebase(PulseReader* signal, PulseReaderUnit unit);
|
||||
*/
|
||||
void pulse_reader_set_bittime(PulseReader* signal, uint32_t bit_time);
|
||||
|
||||
/** Set GPIO pull direction
|
||||
*
|
||||
* Some GPIOs need pulldown, others don't. By default the
|
||||
* pull direction is GpioPullNo.
|
||||
*
|
||||
* @param[in] signal previously allocated PulseReader object.
|
||||
* @param[in] pull GPIO pull direction
|
||||
*/
|
||||
void pulse_reader_set_pull(PulseReader* signal, GpioPull pull);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user