Feetech STS Driver
Loading...
Searching...
No Matches
sts_ports_stm32.h
1#pragma once
2
3sts_result_t STM32_UART_Transmit(sts_bus_t *bus, const uint8_t *data, uint16_t len);
4sts_result_t STM32_UART_Receive(sts_bus_t *bus, uint8_t *data, uint16_t len, uint32_t timeout);
5sts_result_t STM32_UART_FlushRx(sts_bus_t *bus);
6
7/* Call once after STS_Bus_Init, before any servo communication.
8 * enabled=1: STM32 half-duplex mode (direct servo wiring on PA2, no adapter).
9 * PA2 stays AF open-drain; no internal pull-up is configured.
10 * Fit 1.5 kOhm from PA2/DATA to 3.3 V for the tested 1 Mbaud setup.
11 * Communication failed without this external pull-up on that bench.
12 * enabled=0: full-duplex mode (Waveshare adapter, default). */
13void STM32_UART_SetHalfDuplex(void *huart, uint8_t enabled);
14
15void STM32_UART_IdleCallback(void);
16
17void STS_Delay_ms(uint32_t ms);
18uint32_t STS_GetTick_ms(void);
STS Shared Bus Handle.
Definition sts_servo.h:51
sts_result_t
Return codes for STS protocol operations.
Definition sts_protocol.h:71