24 lines
523 B
C
24 lines
523 B
C
#pragma once
|
|
|
|
#include <inttypes.h>
|
|
|
|
#if CONFIG_IDF_TARGET_ESP32H2
|
|
#define DSHOT_ESC_RESOLUTION_HZ 32000000 // 32MHz resolution, DSHot protocol needs a relative high resolution
|
|
#else
|
|
#define DSHOT_ESC_RESOLUTION_HZ 40000000 // 40MHz resolution, DSHot protocol needs a relative high resolution
|
|
#endif
|
|
|
|
#define ESC_UART_NUM UART_NUM_2
|
|
|
|
void init_rmt_esc_tx(void);
|
|
|
|
void send_dshot_packet(void);
|
|
|
|
void parse_telemetry(void);
|
|
|
|
void init_motor(void);
|
|
|
|
uint16_t get_throttle(void);
|
|
|
|
void update_throttle(uint16_t throttle);
|