Any of the DAI pins can be used as general-purpose I/O (GPIO) signals. Use the following snippet for Configuring DAI pin as General purpose output signal:
SRU(HIGH,DAI0_PBEN08_I);// Pin Buffer as Output
SRU(HIGH,DAI0_PB08_I); // For driving high
SRU(LOW,DAI0_PB08_I); // For driving low
To use DAI_P01 as input and DAI_P02 as output, following SRU initialization can be used:
SRU(LOW,DAI0_PBEN02_I);// Pin Buffer as Output
SRU(HIGH,DAI0_PBEN01_I); // Pin Buffer as Input
SRU(DAI0_PB02_O,DAI0_PB01_I); //DAI_PB02 pin output is routed to DAI_PB01 input pin.
Also, need to configure the DAI Port Input Enable Control Register (PADS_DAI0_IE or PADS_DAI1_IE ) for the DAI pin to work as an input. i.e. for the X-th bit in the PADS_DAI0_IE register
if = 0, implies input buffer disable for DAI0 pin X.
if = 1, implies input buffer enable for DAI0 pin X.