Lines Matching refs:GPIOx
100 void GPIO_DeInit(GPIO_TypeDef* GPIOx) in GPIO_DeInit() argument
103 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_DeInit()
105 switch (*(uint32_t*)&GPIOx) in GPIO_DeInit()
151 void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) in GPIO_Init() argument
156 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_Init()
173 tmpreg = GPIOx->CRL; in GPIO_Init()
190 GPIOx->BRR = (((uint32_t)0x01) << pinpos); in GPIO_Init()
197 GPIOx->BSRR = (((uint32_t)0x01) << pinpos); in GPIO_Init()
202 GPIOx->CRL = tmpreg; in GPIO_Init()
208 tmpreg = GPIOx->CRH; in GPIO_Init()
225 GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08)); in GPIO_Init()
230 GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08)); in GPIO_Init()
234 GPIOx->CRH = tmpreg; in GPIO_Init()
259 uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) in GPIO_ReadInputDataBit() argument
264 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_ReadInputDataBit()
267 if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET) in GPIO_ReadInputDataBit()
283 uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx) in GPIO_ReadInputData() argument
286 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_ReadInputData()
288 return ((uint16_t)GPIOx->IDR); in GPIO_ReadInputData()
298 uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) in GPIO_ReadOutputDataBit() argument
302 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_ReadOutputDataBit()
305 if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET) in GPIO_ReadOutputDataBit()
321 uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx) in GPIO_ReadOutputData() argument
324 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_ReadOutputData()
326 return ((uint16_t)GPIOx->ODR); in GPIO_ReadOutputData()
337 void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) in GPIO_SetBits() argument
340 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_SetBits()
343 GPIOx->BSRR = GPIO_Pin; in GPIO_SetBits()
354 void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) in GPIO_ResetBits() argument
357 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_ResetBits()
360 GPIOx->BRR = GPIO_Pin; in GPIO_ResetBits()
374 void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal) in GPIO_WriteBit() argument
377 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_WriteBit()
383 GPIOx->BSRR = GPIO_Pin; in GPIO_WriteBit()
387 GPIOx->BRR = GPIO_Pin; in GPIO_WriteBit()
398 void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal) in GPIO_Write() argument
401 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_Write()
403 GPIOx->ODR = PortVal; in GPIO_Write()
414 void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) in GPIO_PinLockConfig() argument
419 assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); in GPIO_PinLockConfig()
424 GPIOx->LCKR = tmp; in GPIO_PinLockConfig()
426 GPIOx->LCKR = GPIO_Pin; in GPIO_PinLockConfig()
428 GPIOx->LCKR = tmp; in GPIO_PinLockConfig()
430 tmp = GPIOx->LCKR; in GPIO_PinLockConfig()
432 tmp = GPIOx->LCKR; in GPIO_PinLockConfig()