generated from Template/H563ZI-HAL-CMake-Template
Add ble,gps,imu and others in threadx,need test
This commit is contained in:
@@ -8,4 +8,26 @@ void Shake_Motor_Open(void)
|
||||
void Shake_Motor_Close(void)
|
||||
{
|
||||
HAL_GPIO_WritePin(Shake_Motor_GPIO_Port,Shake_Motor_Pin,GPIO_PIN_RESET); // <20>͵<EFBFBD>ƽ<EFBFBD>ر<EFBFBD>
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD>
|
||||
void Shake_Motor_Left(void)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ: <20><><EFBFBD><EFBFBD>3<EFBFBD><33>
|
||||
for(int i=0; i<3; i++)
|
||||
{
|
||||
HAL_GPIO_WritePin(Shake_Motor_GPIO_Port, Shake_Motor_Pin, GPIO_PIN_SET);
|
||||
tx_thread_sleep(50);
|
||||
HAL_GPIO_WritePin(Shake_Motor_GPIO_Port, Shake_Motor_Pin, GPIO_PIN_RESET);
|
||||
tx_thread_sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
void Shake_Motor_Right(void)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ: <20><><EFBFBD><EFBFBD>1<EFBFBD><31>
|
||||
HAL_GPIO_WritePin(Shake_Motor_GPIO_Port, Shake_Motor_Pin, GPIO_PIN_SET);
|
||||
tx_thread_sleep(300);
|
||||
HAL_GPIO_WritePin(Shake_Motor_GPIO_Port, Shake_Motor_Pin, GPIO_PIN_RESET);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user