mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-21 20:42:15 -07:00
fixed linter errors and undone function renaming
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PULSE_READER_NO_EDGE 0xFFFFFFFFUL
|
||||
#define PULSE_READER_LOST_EDGE 0xFFFFFFFEUL
|
||||
#define F_TIM2 64000000UL
|
||||
#define PULSE_READER_NO_EDGE 0xFFFFFFFFUL
|
||||
#define PULSE_READER_LOST_EDGE 0xFFFFFFFEUL
|
||||
#define F_TIM2 64000000UL
|
||||
|
||||
/**
|
||||
* unit of the edge durations to return
|
||||
@@ -28,7 +28,6 @@ typedef enum {
|
||||
PulseReaderUnitMicrosecond,
|
||||
} PulseReaderUnit;
|
||||
|
||||
|
||||
typedef struct {
|
||||
bool start_level;
|
||||
uint32_t* timer_buffer;
|
||||
@@ -47,7 +46,6 @@ typedef struct {
|
||||
LL_DMA_InitTypeDef dma_config_gpio;
|
||||
} PulseReader;
|
||||
|
||||
|
||||
/** Allocate a PulseReader object
|
||||
*
|
||||
* Allocates memory for a ringbuffer and initalizes the object
|
||||
@@ -57,7 +55,6 @@ typedef struct {
|
||||
*/
|
||||
PulseReader* pulse_reader_alloc(const GpioPin* gpio, uint32_t size);
|
||||
|
||||
|
||||
/** Free a PulseReader object
|
||||
*
|
||||
* Frees all memory of the given object
|
||||
@@ -66,7 +63,6 @@ PulseReader* pulse_reader_alloc(const GpioPin* gpio, uint32_t size);
|
||||
*/
|
||||
void pulse_reader_free(PulseReader* signal);
|
||||
|
||||
|
||||
/** Start signal capturing
|
||||
*
|
||||
* Initializes DMA1, TIM2 and DMAMUX_REQ_GEN_0 to automatically capture timer values
|
||||
@@ -75,7 +71,6 @@ void pulse_reader_free(PulseReader* signal);
|
||||
*/
|
||||
void pulse_reader_start(PulseReader* signal);
|
||||
|
||||
|
||||
/** Stop signal capturing
|
||||
*
|
||||
* Frees DMA1, TIM2 and DMAMUX_REQ_GEN_0
|
||||
@@ -84,7 +79,6 @@ void pulse_reader_start(PulseReader* signal);
|
||||
*/
|
||||
void pulse_reader_stop(PulseReader* signal);
|
||||
|
||||
|
||||
/** Recevie a sample from ringbuffer
|
||||
*
|
||||
* Waits for the specified time until a new edge gets detected.
|
||||
@@ -99,7 +93,6 @@ void pulse_reader_stop(PulseReader* signal);
|
||||
*/
|
||||
uint32_t pulse_reader_receive(PulseReader* signal, int timeout_us);
|
||||
|
||||
|
||||
/** Get available samples
|
||||
*
|
||||
* Get the number of available samples in the ringbuffer
|
||||
@@ -110,7 +103,6 @@ uint32_t pulse_reader_receive(PulseReader* signal, int timeout_us);
|
||||
*/
|
||||
uint32_t pulse_reader_samples(PulseReader* signal);
|
||||
|
||||
|
||||
/** Set timebase
|
||||
*
|
||||
* Set the timebase to be used when returning pulse duration.
|
||||
@@ -120,7 +112,6 @@ uint32_t pulse_reader_samples(PulseReader* signal);
|
||||
*/
|
||||
void pulse_reader_set_timebase(PulseReader* signal, PulseReaderUnit unit);
|
||||
|
||||
|
||||
/** Set bit time
|
||||
*
|
||||
* Set the number of timebase units per bit.
|
||||
@@ -134,7 +125,6 @@ void pulse_reader_set_timebase(PulseReader* signal, PulseReaderUnit unit);
|
||||
*/
|
||||
void pulse_reader_set_bittime(PulseReader* signal, uint32_t bit_time);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user