งงกับส่วนนี้ครับ
HAL_GPIO_WritePin
Function Name void HAL_GPIO_WritePin ( GPIO_TypeDef * GPIOx, uint16_t
GPIO_Pin, GPIO_PinState PinState)
Function Description Sets or clears the selected data port bit.
Parameters GPIOx : where x can be (A..K) to select the GPIO peripheral
for STM32F429X device or x can be (A..I) to select the GPIO
peripheral for STM32F40XX and STM32F427X devices.
GPIO_Pin : specifies the port bit to be written. This
parameter can be one of GPIO_PIN_x where x can be (0..15).
PinState : specifies the value to be written to the selected
bit. This parameter can be one of the GPIO_PinState enum
values: GPIO_BIT_RESET: to clear the port pin
GPIO_BIT_SET: to set the port pin
Return values None.
Notes This function uses GPIOx_BSRR register to allow atomic
read/modify accesses. In this way, there is no risk of an IRQ
occurring between the read and the modify access
link เอกสารครับ
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00105879.pdf
ใครใช้ libarry ของ stm32 เป็นบ้างครับ
HAL_GPIO_WritePin
Function Name void HAL_GPIO_WritePin ( GPIO_TypeDef * GPIOx, uint16_t
GPIO_Pin, GPIO_PinState PinState)
Function Description Sets or clears the selected data port bit.
Parameters GPIOx : where x can be (A..K) to select the GPIO peripheral
for STM32F429X device or x can be (A..I) to select the GPIO
peripheral for STM32F40XX and STM32F427X devices.
GPIO_Pin : specifies the port bit to be written. This
parameter can be one of GPIO_PIN_x where x can be (0..15).
PinState : specifies the value to be written to the selected
bit. This parameter can be one of the GPIO_PinState enum
values: GPIO_BIT_RESET: to clear the port pin
GPIO_BIT_SET: to set the port pin
Return values None.
Notes This function uses GPIOx_BSRR register to allow atomic
read/modify accesses. In this way, there is no risk of an IRQ
occurring between the read and the modify access
link เอกสารครับ
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00105879.pdf