LoginSignup
7
9

More than 5 years have passed since last update.

STM32 HAL よく使う文

Posted at

HALライブラリのクイック構文集です。

deley

HAL_Delay(100);

GPIO

ピンをHigh
HAL_GPIO_WritePin(GPIOA,PIN,GPIO_PIN_SET);
ピンをLow
HAL_GPIO_WritePin(GPIOA,PIN,GPIO_PIN_RESET);

UART

OUTPUT char
HAL_UART_Transmit(&huart1,(uint8_t *),1,3000);

OUTPUT String
HAL_UART_Transmit(&huart1,(uint8_t *),strlen(s),3000);

INPUT
HAL_UART_Receive(&huart1,(uint8_t *)&c,1,3000);

※3000はタイムアウト

7
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
9