From f5880ee5d5559d45771e4a626c54309c88f437e7 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Fri, 1 Jul 2016 09:51:32 +0900
Subject: Change API of chopstx_setpriority

---
 example-fs-bb48/touch.c | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'example-fs-bb48')

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;
-- 
cgit v1.2.3