update transDataToMotorValve

This commit is contained in:
murmur 2024-12-19 23:34:37 +08:00
parent 6c74c2e095
commit df9e7376e6
3 changed files with 13 additions and 2 deletions

View File

@ -55,7 +55,7 @@ extern volatile uint8_t motorRxEnd;
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
void transDataToMotorValve(uint8_t *data, uint16_t len);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */

View File

@ -69,6 +69,17 @@ void transDataToHost(uint8_t *data, uint16_t len)
HAL_GPIO_WritePin(DIR1_GPIO_Port, DIR1_Pin, GPIO_PIN_RESET);
// HAL_Delay(100);
}
void transDataToMotorValve(uint8_t *data, uint16_t len)
{
// 开启uart3 dma
HAL_GPIO_WritePin(DIR2_GPIO_Port, DIR2_Pin, GPIO_PIN_SET);
// HAL_Delay(100);
// HAL_UART_Transmit_DMA(&huart2, data, len);
HAL_UART_Transmit(&huart2, data, len, 100);
HAL_GPIO_WritePin(DIR2_GPIO_Port, DIR2_Pin, GPIO_PIN_RESET);
// HAL_Delay(100);
}
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/

@ -1 +1 @@
Subproject commit e4ee1c0eecad3dcc04ef071132ef67d852a0c974
Subproject commit ce8530303e7042bb58c67772ecd9c32586df1fdb