2014-11-09 03:46 AM
Dear All,
I am using CMSIS '' STM32F0-Discovery_FW_V1.0.0 '' library files for STM32F0 MCU programming which does not support GPIO_ToggleBits(GPIOD,GPIO_Pin_9); instructionI already checked the ''gpio'' file which do not have Toggle functionplease advice2014-11-09 07:19 AM
Ok, neither the F0 or F1 libraries have this. Pretty simple though, and more efficient ways of setting/clearing.
/**
* @brief Toggles the specified GPIO pins..
* @param GPIOx: where x can be (A..I) to select the GPIO peripheral.
* @param GPIO_Pin: Specifies the pins to be toggled.
* @retval None
*/
void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
/* Check the parameters */
assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
GPIOx->ODR ^= GPIO_Pin;
}
2014-11-09 07:43 AM
Dear clive
Grate thanks for the replyI used following old methodGPIOC->ODR ^= GPIO_Pin_8;Can I know the instruction base on CMSIS type