Temporary workaround for FW1.27
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
992c55b785
commit
e506bfc56a
@ -262,10 +262,30 @@ struct SpiRegisters
|
||||
|
||||
#ifdef HAL_UART_MODULE_ENABLED
|
||||
|
||||
namespace _Details
|
||||
{
|
||||
|
||||
/**
|
||||
* @hack: Temporary workarounds to make the HAL compile for FW1.27. ST made it so that only UART libraries
|
||||
* are const-correct. The others remain unconst. So these wrappers will exist until we're no longer partially
|
||||
* const-correct.
|
||||
*/
|
||||
inline HAL_StatusTypeDef uartTransmit(UART_HandleTypeDef *huart, std::uint8_t *data, const std::uint16_t size, const std::uint32_t timeout)
|
||||
{
|
||||
return HAL_UART_Transmit(huart, data, size, timeout);
|
||||
}
|
||||
|
||||
inline HAL_StatusTypeDef uartTransmitDma(UART_HandleTypeDef *huart, std::uint8_t *data, const std::uint16_t size)
|
||||
{
|
||||
return HAL_UART_Transmit_DMA(huart, data, size);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using UartInterface =
|
||||
SerialInterface<UART_HandleTypeDef, HAL_UART_Transmit, HAL_UART_Receive>;
|
||||
SerialInterface<UART_HandleTypeDef, _Details::uartTransmit, HAL_UART_Receive>;
|
||||
using UartInterfaceDMA =
|
||||
SerialInterfaceAsync<UART_HandleTypeDef, HAL_UART_Transmit_DMA,
|
||||
SerialInterfaceAsync<UART_HandleTypeDef, _Details::uartTransmitDma,
|
||||
HAL_UART_Receive_DMA>;
|
||||
|
||||
#endif// HAL_UART_MODULE_ENABLED
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user