Hi,
I read example projects of Tiva-C 1294. There are many similar uses ' GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_2, GPIO_PIN_2);'
The prototype is :
extern void GPIOPinWrite(uint32_t ui32Port, uint8_t ui8Pins, uint8_t ui8Val);
The last parameter is a value, not a pin. I have asked the question on TI forum. I know that it is bit-banding, but that answer lacks detail on why it is bit-banding, it is set to '1' or clear to '0'?
Could you tell me more the line on GPIO_PIN_2?
Thanks,
void EK_TM4C1294XL_initWiFi(void)
void
EK_TM4C1294XL_initWiFi(
)
{
/* Configure EN & CS pins to disable CC3100 */
GPIOPinTypeGPIOOutput(GPIO_PORTH_BASE, GPIO_PIN_2);
GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_6);
GPIOPinWrite(GPIO_PORTH_BASE, GPIO_PIN_2, GPIO_PIN_2);
GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_6, 0);
Hello,
I think the statements are not related with the bit-banding.
I think they are just GPIO settings.
I guess that GPIO_PIN_2 would be 0x4 (i.e. bit2 is 1).
So,
means set GPIOH[2] to '1'.
Also,
means set GPIOC[6] to '0'.
Best regards,
Yasuhiko Koumoto.