|
|
@ -22,10 +22,13 @@ static void dumphex(const char* tag, uint8_t* data, uint8_t len) { |
|
|
|
printf("\n"); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
void FeiTeServoMotor::initialize2(UART_HandleTypeDef* uart, DMA_HandleTypeDef* hdma_tx,DMA_HandleTypeDef* hdma_rx) { |
|
|
|
void FeiTeServoMotor::initialize(UART_HandleTypeDef* uart, DMA_HandleTypeDef* hdma_rx, DMA_HandleTypeDef* hdma_tx) { |
|
|
|
m_uart = uart; |
|
|
|
m_hdma_rx = hdma_rx; |
|
|
|
m_hdma_tx = hdma_tx; |
|
|
|
ZASSERT(hdma_rx->Init.Direction == DMA_PERIPH_TO_MEMORY); |
|
|
|
ZASSERT(hdma_tx->Init.Direction == DMA_MEMORY_TO_PERIPH); |
|
|
|
|
|
|
|
m_mutex.init(); |
|
|
|
} |
|
|
|
bool FeiTeServoMotor::ping(uint8_t id) { |
|
|
|