// enable muxed pins as gpio outputs and disable all related interrupts.
// would need to also setup the pinmux register to select the gpio
// function of these pins in order to use as gpio.
// TMR0->GPINT_GPEN = GPENO12 | GPENI12;
// TMR0->GPDATA_GPDIR = GPDIRO12 | GPDIRI12;
// stop the timer, clear int stat, and clear timer value.
CLRBIT(TMR0->TGCR, TIM34RS);
TMR0->TCR = 0x00000000;
SETBIT(TMR0->INTCTLSTAT, PRDINTSTAT34);
TMR0->TIM34 = 0x00000000;
// setup compare time.
TMR0->PRD34 = TICKS_PER_US * in_delay;
// start timer1 - 3:4 to run once up to the period.
SETBIT(TMR0->TCR, ENAMODE34_ONETIME);
SETBIT(TMR0->TGCR, TIM34RS);
// wait for the signal that we have hit our period.
while (!CHKBIT(TMR0->INTCTLSTAT, PRDINTSTAT34));
#else
// stop the timer, clear int stat, and clear timer value.
CLRBIT(TMR0->TGCR, TIM12RS);
TMR0->TCR = 0x00000000;
SETBIT(TMR0->INTCTLSTAT, PRDINTSTAT12);
TMR0->TIM12 = 0x00000000;