aboutsummaryrefslogtreecommitdiff
path: root/example-fs-bb48/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'example-fs-bb48/touch.c')
-rw-r--r--example-fs-bb48/touch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/example-fs-bb48/touch.c b/example-fs-bb48/touch.c
index 127be23..960692e 100644
--- a/example-fs-bb48/touch.c
+++ b/example-fs-bb48/touch.c
@@ -27,6 +27,10 @@ static chopstx_intr_t tpm1_intr;
uint16_t
touch_get (void)
{
+ chopstx_prio_t prio_old;
+
+ prio_old = chopstx_setpriority (CHOPSTX_PRIO_INHIBIT_PREEMPTION);
+
/* Assert LOW. */
PORTB->PCR1 = (1<<8) /* GPIO */
| (0<<6) /* DriveStrengthEnable=0 */
@@ -51,6 +55,8 @@ touch_get (void)
| (0<<0) /* puddselect= 0 */
;
+ chopstx_setpriority (prio_old);
+
chopstx_intr_wait (&tpm1_intr);
/* Clear overflow and CH1 capture. */
TPM1->STATUS = 0x102;