Other Parts Discussed in Thread: C2000WARE
Tool/software:
Hi everyone,
I'm testing the GPIO input function on my LAUNCHXL F28P55X board. I used two functions: GPIO_readPin(uint32_t pin) and GPIO_readPinDataRegister(uint32_t pin).
My English is not very good, so I don't fully understand the difference from the comments in the gpio.h file. Also, my test results are not what I expected.
I have already set up GPIO48 as an input. I also enabled the pull-up resistor (I checked with a multimeter and it has 3.3V).
My first question:
When I want to read the current input state of a GPIO pin (like GPIO48, which is set as an input), which function should I use? GPIO_readPin(uint32_t pin) or GPIO_readPinDataRegister(uint32_t pin)? I want to know if the pin is HIGH or LOW due to an external signal.
My second question:
If a GPIO pin is configured as an output, and I want to confirm its current output state (e.g., if it's currently outputting HIGH or LOW), which function should I use for that?
Thank you for your help!
gpio.h



