make structures private, add C implementation of digital_signal_update_dma()

This commit is contained in:
g3gg0.de
2022-12-28 22:43:39 +01:00
committed by Tiernan Messmer
parent f08c8d6a1d
commit c18cf71646
4 changed files with 147 additions and 109 deletions
+2 -21
View File
@@ -3,10 +3,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stm32wbxx_ll_dma.h>
#include <stm32wbxx_ll_dmamux.h>
#include <stm32wbxx_ll_tim.h>
#include <stm32wbxx_ll_exti.h>
#include <furi_hal_gpio.h>
@@ -28,23 +24,8 @@ typedef enum {
PulseReaderUnitMicrosecond,
} PulseReaderUnit;
typedef struct {
uint32_t* timer_buffer;
uint32_t* gpio_buffer;
uint32_t size;
uint32_t pos;
uint32_t timer_value;
uint32_t gpio_value;
uint32_t gpio_mask;
uint32_t unit_multiplier;
uint32_t unit_divider;
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;
/* using an anonymous type */
typedef struct PulseReader PulseReader;
/** Allocate a PulseReader object
*