diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-07-01 09:51:32 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-07-01 09:51:32 +0900 |
commit | f5880ee5d5559d45771e4a626c54309c88f437e7 (patch) | |
tree | e56e5e14d6d91fa3a8d9a044a918eaebeae082e8 /example-fs-bb48 | |
parent | c7e571eca0c925008be99efb4e7ba3bc876a7309 (diff) |
Change API of chopstx_setpriority
Diffstat (limited to 'example-fs-bb48')
-rw-r--r-- | example-fs-bb48/touch.c | 6 |
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; |