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.

TM4C123GH6PM: Bit Banding implementation

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Hello, I want to implement bit banding to use it to set and clear GPIO pin but I found it take more instruction cycle than set way 

this is my implementation if there is some error tell me the best way to implement it 

volatile uint32_t* GPIO_GetBitBandIOAddress(unsigned int index)
{
PinConfig *pinDef = (PinConfig *) &GPIOTiva_config.pinConfigs[index];
const volatile uint32_t * baseAddress = gpioBaseAddresses[pinDef->port];

int pinNumber = getPinNumber(pinDef->pin);

// Add 0x3FC (data register offset) and clear the top byte to get the data address.
uint32_t dataAddress = 0x00FFFFFF & ((uint32_t)baseAddress + 0x3FC);

return (volatile uint32_t *)(0x42000000 + (32*dataAddress) + (4*pinNumber));
}