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.

RTOS/LAUNCHXL-CC1350: GPIO Pins

Part Number: LAUNCHXL-CC1350

Tool/software: TI-RTOS

How can I configure a gpio pin as input in ccs. Syntax that we need to follow to specify a specific pin as input pin.

  • Hi Shubham,

    Your application should define pin configuration table to configure pins as inputs or outputs.  You need only add an entry to that table to configure a pin to be used as an input & set any pull resistors or interrupt capability.  Then you can use Pin APIs to set the configuration & configure any interrupt service routines.  TI-RTOS has several Pin examples you can use as reference; but I have added a code-snip from the pinShutdown example below:

    // Define pin table & pin configurations
    /* Shutdown Button pin table */
    PIN_Config ButtonTableShutdown[] = {
    // This is the pin these are the configuration options Board_PIN_BUTTON1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE, PIN_TERMINATE /* Terminate list */ }; ... // Set the pin configuration & the interrupt callback /* Setup button pins with ISR */ hButtons = PIN_open(&buttonState, ButtonTableShutdown); PIN_registerIntCb(hButtons, buttonCb);

    The full list of Pin configuration settings can be found in the driver doxygen.

    Hope this helps,

    -- Emmanuel

  • Thanks For the reply sir.

    But what i am asking is how to configure pin DIO5 as input pin? I am not getting this? The c code for this and what is doxygen driver?

  • Hi Shubham,

    I have replied to your other post (here).  I will continue to provide support on the other thread.

    Regards,

    -- Emmanuel