I have some GPIO signals that I have configured as outputs.
I used GPIO_write() to set the values. In my code, I would also like to know what they are currently set to and I use GPIO_read to read the current setting. This code works perfectly fine.
GPIOMSP432E4_PK5 | GPIO_CFG_OUT_STD | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_LOW //set in gpioPinConfigs[] array GPIO_write(PK5_Output, 1); //PK5_Output defined in MSP432401Y.h file as an index to the gpioPinConfigs[] array //some code later currentValue = GPIO_read(PK5_Output);
Is this is an acceptable method to read the setting of the digital I/O and I am not introducing some negative side effects?