17 changed the ways in which we take a critical section. Since the driver takes critical sections, we don't need another critical section just to acquire a GPT handle. This PR changes the GPT accessor interface. Updated docs indicate that the accessor may take a critical section.
It also corrects two incorrect register accesses following #12:
clear_elapsed should write, not modify, the status register. Flags are W1C, and the modify could cause other status bits to be cleared.
Enabling / disabling driver interrupts should modify, not write, the interrupt flags. A change in interrupt bits from the driver could lower the GPT's interrupt bit, depending on the access order.
GPTs are not released, so these bugs are only on the main branch.
17 changed the ways in which we take a critical section. Since the driver takes critical sections, we don't need another critical section just to acquire a GPT handle. This PR changes the GPT accessor interface. Updated docs indicate that the accessor may take a critical section.
It also corrects two incorrect register accesses following #12:
clear_elapsed
should write, not modify, the status register. Flags are W1C, and the modify could cause other status bits to be cleared.GPTs are not released, so these bugs are only on the main branch.