pulse_reader: add call to set GPIO pull direction

This commit is contained in:
g3gg0.de
2022-12-28 14:40:29 +01:00
committed by Tiernan Messmer
parent 67b02b7785
commit f08c8d6a1d
3 changed files with 18 additions and 1 deletions
+11
View File
@@ -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