Question
A stupid question about GPIO input mode
Posted on June 07, 2014 at 00:56
Hi ST,
I'm using ST32F4Discovery board, and I want to read a 4 bit data that is continuously streaming in. I'm thinking of doing:1. set GPIO port for the input (say PA10)2. call this function to read data: GPIO_ReadInputDataBit(GPIOA, GPIO_PIN_10)Would this work?Also, i just wanted to ask how can you even use the function GPIO_ReadInputData (in the GPIO library) if it has no pin# as input parameter?uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx);Also, is there a way to do this in DMA mode? read input 4-bit data and go straight into memory.