Also, I read the docs on the gpio_output_set() function, but I don't understand why the shift operation is in there either. (Yes, I am extremely new at this.) If someone could give me a walk-through on what is happening behind the scenes here, it would be so helpful.
static const int pin = 0;
void some_timerfunc(void *arg)
{
//Do blinky stuff
if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & (1 << pin))
{
// set gpio low
gpio_output_set(0, (1 << pin), 0, 0);
}
else
{
// set gpio high
gpio_output_set((1 << pin), 0, 0, 0);
}