1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

dshot bidir support for f7

This commit is contained in:
Thorsten Laux 2019-02-20 11:52:40 +01:00
parent 394807f558
commit d2147d4ece
8 changed files with 475 additions and 298 deletions

View file

@ -87,6 +87,13 @@ __STATIC_INLINE void LL_EX_DMA_SetDataLength(DMA_Stream_TypeDef* DMAx_Streamy, u
MODIFY_REG(DMAx_Streamy->NDTR, DMA_SxNDT, NbData);
}
__STATIC_INLINE uint32_t LL_EX_DMA_GetDataLength(DMA_Stream_TypeDef* DMAx_Streamy)
{
DMA_TypeDef *DMA = LL_EX_DMA_Stream_to_DMA(DMAx_Streamy);
const uint32_t Stream = LL_EX_DMA_Stream_to_Stream(DMAx_Streamy);
return LL_DMA_GetDataLength(DMA, Stream);
}
__STATIC_INLINE void LL_EX_TIM_EnableIT(TIM_TypeDef *TIMx, uint32_t Sources)
{
SET_BIT(TIMx->DIER, Sources);