- Lenovo Thinkpad E14G3 (20Y7004ETX)
- AMD Ryzen 7 5700U
- 16GB RAM
- 1TB SSD
- 14" FHD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* USER CODE BEGIN 0 */ | |
void delay_us (uint16_t us) | |
{ | |
__HAL_TIM_SET_COUNTER(&htim2,0); // set the counter value a 0 | |
while (__HAL_TIM_GET_COUNTER(&htim2) < us); // wait for the counter to reach the us input in the parameter | |
} | |
void simpleAccel(int steps, GPIO_PinState dir) | |
{ | |
HAL_GPIO_WritePin(Output1_GPIO_Port, Output1_Pin, dir); |