This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J721S2: J721s2

Part Number: PROCESSOR-SDK-J721S2

Hi, 

I am trying to read the configuration of the GPIO pin (in/out). How to read the pin direction using SDK function. Which function i need to use for the reading. If the function is not available in the SDK can please provide the function for the same. 

  • Hi Maheshwar,

    I am assuming that you are using PSDK RTOS and controlling GPIO from R5F based on your previous posts - please correct me if I am wrong.

    For PSDK RTOS, we do not have a function available for reading pin direction. All available GPIO related functions are located in <PSDK RTOS install location>/pdk_j721s2_08_06_00_31/packages/ti/drv/gpio/GPIO.h. To determine pin direction, one option is to read the GPIO_PinConfig struct that you have defined. GPIO_CFG_OUTPUT and GPIO_CFG_INPUT are also defined in the same GPIO.h file, and doing a bit mask to determine how you set it up should tell if a pin was configured output or input.

    Regards,

    Takuma