Lines Matching refs:GPIOx
166 void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, const GPIO_InitTypeDef *GPIO_Init) in HAL_GPIO_Init() argument
173 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_Init()
193 temp = GPIOx->OSPEEDR; in HAL_GPIO_Init()
196 GPIOx->OSPEEDR = temp; in HAL_GPIO_Init()
199 temp = GPIOx->OTYPER; in HAL_GPIO_Init()
202 GPIOx->OTYPER = temp; in HAL_GPIO_Init()
212 temp = GPIOx->PUPDR; in HAL_GPIO_Init()
215 GPIOx->PUPDR = temp; in HAL_GPIO_Init()
222 assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); in HAL_GPIO_Init()
226 temp = GPIOx->AFR[position >> 3u]; in HAL_GPIO_Init()
229 GPIOx->AFR[position >> 3u] = temp; in HAL_GPIO_Init()
233 temp = GPIOx->MODER; in HAL_GPIO_Init()
236 GPIOx->MODER = temp; in HAL_GPIO_Init()
244 temp |= (GPIO_GET_INDEX(GPIOx) << ((position & 0x03u) * EXTI_EXTICR1_EXTI1_Pos)); in HAL_GPIO_Init()
294 void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin) in HAL_GPIO_DeInit() argument
301 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_DeInit()
317 if (tmp == (GPIO_GET_INDEX(GPIOx) << ((position & 0x03u) * EXTI_EXTICR1_EXTI1_Pos))) in HAL_GPIO_DeInit()
333 GPIOx->MODER |= (GPIO_MODER_MODE0 << (position * GPIO_MODER_MODE1_Pos)); in HAL_GPIO_DeInit()
336 GPIOx->AFR[position >> 3u] &= ~(0xFu << ((position & 0x07u) * GPIO_AFRL_AFSEL1_Pos)) ; in HAL_GPIO_DeInit()
339 GPIOx->OSPEEDR &= ~(GPIO_OSPEEDR_OSPEED0 << (position * GPIO_OSPEEDR_OSPEED1_Pos)); in HAL_GPIO_DeInit()
342 GPIOx->OTYPER &= ~(GPIO_OTYPER_OT0 << position) ; in HAL_GPIO_DeInit()
345 GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPD0 << (position * GPIO_PUPDR_PUPD1_Pos)); in HAL_GPIO_DeInit()
348 GPIOx->DELAYR[position >> 3u] &= ~(0xFu << ((position & 0x07u) * GPIO_DELAYRL_DLY1_Pos)) ; in HAL_GPIO_DeInit()
351 GPIOx->ADVCFGR[position >> 3u] &= ~(0xFu << ((position & 0x07u) * GPIO_ADVCFGRL_1_Pos)) ; in HAL_GPIO_DeInit()
381 GPIO_PinState HAL_GPIO_ReadPin(const GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) in HAL_GPIO_ReadPin() argument
388 if ((GPIOx->IDR & GPIO_Pin) != 0x00u) in HAL_GPIO_ReadPin()
413 void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) in HAL_GPIO_WritePin() argument
421 GPIOx->BSRR = (uint32_t)GPIO_Pin; in HAL_GPIO_WritePin()
425 GPIOx->BRR = (uint32_t)GPIO_Pin; in HAL_GPIO_WritePin()
436 void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) in HAL_GPIO_TogglePin() argument
444 odr = GPIOx->ODR; in HAL_GPIO_TogglePin()
447 GPIOx->BSRR = ((odr & GPIO_Pin) << GPIO_NUMBER) | (~odr & GPIO_Pin); in HAL_GPIO_TogglePin()
462 void HAL_GPIO_WriteMultipleStatePin(GPIO_TypeDef *GPIOx, uint16_t PinReset, uint16_t PinSet) in HAL_GPIO_WriteMultipleStatePin() argument
472 GPIOx->BSRR = tmp; in HAL_GPIO_WriteMultipleStatePin()
485 HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) in HAL_GPIO_LockPin() argument
490 assert_param(IS_GPIO_LOCK_INSTANCE(GPIOx)); in HAL_GPIO_LockPin()
496 GPIOx->LCKR = tmp; in HAL_GPIO_LockPin()
498 GPIOx->LCKR = GPIO_Pin; in HAL_GPIO_LockPin()
500 GPIOx->LCKR = tmp; in HAL_GPIO_LockPin()
502 tmp = GPIOx->LCKR; in HAL_GPIO_LockPin()
505 if ((GPIOx->LCKR & GPIO_LCKR_LCKK) != 0x00u) in HAL_GPIO_LockPin()
524 void HAL_GPIO_SetRetime(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, const GPIO_RetimeTypeDef *pRet_Init) in HAL_GPIO_SetRetime() argument
531 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_SetRetime()
545 temp = GPIOx->ADVCFGR[position >> 3u]; in HAL_GPIO_SetRetime()
550 GPIOx->ADVCFGR[position >> 3u] = temp; in HAL_GPIO_SetRetime()
564 HAL_StatusTypeDef HAL_GPIO_GetRetime(const GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_RetimeTypeD… in HAL_GPIO_GetRetime() argument
570 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_GetRetime()
584 pRet_Init->Edge = ((GPIOx->ADVCFGR[position >> 3u] in HAL_GPIO_GetRetime()
586 pRet_Init->Retime = ((GPIOx->ADVCFGR[position >> 3u] & (GPIO_ADVCFGRL_RET0 << index)) >> index); in HAL_GPIO_GetRetime()
601 void HAL_GPIO_SetDelay(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, const GPIO_DelayTypeDef *pDly_Init) in HAL_GPIO_SetDelay() argument
608 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_SetDelay()
622 temp = GPIOx->ADVCFGR[position >> 3u]; in HAL_GPIO_SetDelay()
625 GPIOx->ADVCFGR[position >> 3u] = temp; in HAL_GPIO_SetDelay()
628 temp = GPIOx->DELAYR[position >> 3u]; in HAL_GPIO_SetDelay()
631 GPIOx->DELAYR[position >> 3u] = temp; in HAL_GPIO_SetDelay()
645 HAL_StatusTypeDef HAL_GPIO_GetDelay(const GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_DelayTypeDef… in HAL_GPIO_GetDelay() argument
651 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_GetDelay()
665 pDly_Init->Delay = ((GPIOx->DELAYR[position >> 3u] & (GPIO_DELAYRL_DLY0_Msk << index)) >> index); in HAL_GPIO_GetDelay()
666 pDly_Init->Path = ((GPIOx->ADVCFGR[position >> 3u] & (GPIO_ADVCFGRL_DLYPATH0 << index)) >> index); in HAL_GPIO_GetDelay()
750 void HAL_GPIO_LockPinAttributes(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) in HAL_GPIO_LockPinAttributes() argument
754 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_LockPinAttributes()
758 GPIOx->RCFGLOCKR = (uint32_t)GPIO_Pin; in HAL_GPIO_LockPinAttributes()
766 uint32_t HAL_GPIO_GetLockPinAttributes(const GPIO_TypeDef *GPIOx) in HAL_GPIO_GetLockPinAttributes() argument
770 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_GetLockPinAttributes()
773 return (GPIOx->RCFGLOCKR); in HAL_GPIO_GetLockPinAttributes()
792 void HAL_GPIO_ConfigPinAttributes(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, uint32_t PinAttributes) in HAL_GPIO_ConfigPinAttributes() argument
800 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_ConfigPinAttributes()
806 sec = GPIOx->SECCFGR; in HAL_GPIO_ConfigPinAttributes()
819 GPIOx->SECCFGR = sec; in HAL_GPIO_ConfigPinAttributes()
822 priv = GPIOx->PRIVCFGR; in HAL_GPIO_ConfigPinAttributes()
836 GPIOx->PRIVCFGR = priv; in HAL_GPIO_ConfigPinAttributes()
847 HAL_StatusTypeDef HAL_GPIO_GetConfigPinAttributes(const GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, in HAL_GPIO_GetConfigPinAttributes() argument
852 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); in HAL_GPIO_GetConfigPinAttributes()
861 if ((GPIOx->SECCFGR & GPIO_Pin) != 0x00U) in HAL_GPIO_GetConfigPinAttributes()
870 if ((GPIOx->PRIVCFGR & GPIO_Pin) != 0x00U) in HAL_GPIO_GetConfigPinAttributes()