Добавлен таргет проект для PY32F002A

This commit is contained in:
2025-03-06 13:26:17 +03:00
parent 15134a549a
commit 4c987be8e7
106 changed files with 88903 additions and 450 deletions

View File

@@ -288,9 +288,9 @@ RS_StatusTypeDef RS_Abort(RS_HandleTypeDef *hRS, RS_AbortTypeDef AbortMode)
if(hRS->sRS_Timeout) // if timeout setted
{
TIM14->DIER &= ~(TIM_IT_UPDATE);
TIM_MB->DIER &= ~(TIM_IT_UPDATE);
/* Disable the Peripheral */
TIM14->CR1 &= ~(TIM_CR1_CEN);
TIM_MB->CR1 &= ~(TIM_CR1_CEN);
}
if((AbortMode&ABORT_RS) == 0x00)
@@ -414,9 +414,9 @@ RS_StatusTypeDef RS_UART_RxCpltCallback(RS_HandleTypeDef *hRS)
if(hRS->sRS_Timeout) // if timeout setted
{
TIM14->DIER &= ~(TIM_IT_UPDATE);
TIM_MB->DIER &= ~(TIM_IT_UPDATE);
/* Disable the Peripheral */
TIM14->CR1 &= ~(TIM_CR1_CEN);
TIM_MB->CR1 &= ~(TIM_CR1_CEN);
}
// parse received data
@@ -447,9 +447,9 @@ RS_StatusTypeDef RS_UART_RxCpltCallback(RS_HandleTypeDef *hRS)
if(hRS->sRS_Timeout) // if timeout setted
{
TIM14->DIER &= ~(TIM_IT_UPDATE);
TIM_MB->DIER &= ~(TIM_IT_UPDATE);
/* Disable the Peripheral */
TIM14->CR1 &= ~(TIM_CR1_CEN);
TIM_MB->CR1 &= ~(TIM_CR1_CEN);
}
// parse received data
@@ -503,9 +503,9 @@ void RS_UART_Handler(RS_HandleTypeDef *hRS)
if(hRS->sRS_Timeout) // if timeout setted
if((hRS->huart->RxXferCount+1 == hRS->huart->RxXferSize) && RS_Is_RX_Busy(hRS)) // if first byte is received and receive is active
{
TIM14->DIER |= (TIM_IT_UPDATE);
TIM_MB->DIER |= (TIM_IT_UPDATE);
/* Disable the Peripheral */
TIM14->CR1 |= (TIM_CR1_CEN);
TIM_MB->CR1 |= (TIM_CR1_CEN);
RS_Set_RX_Active_Flags(hRS);
}
@@ -540,11 +540,11 @@ void RS_UART_Handler(RS_HandleTypeDef *hRS)
*/
void RS_TIM_Handler(RS_HandleTypeDef *hRS)
{
TIM14->SR = ~(TIM_IT_UPDATE);
TIM_MB->SR = ~(TIM_IT_UPDATE);
/* Disable the TIM Update interrupt */
TIM14->DIER &= ~(TIM_IT_UPDATE);
TIM_MB->DIER &= ~(TIM_IT_UPDATE);
/* Disable the Peripheral */
TIM14->CR1 &= ~(TIM_CR1_CEN);
TIM_MB->CR1 &= ~(TIM_CR1_CEN);
RS_Abort(hRS, ABORT_RS);