seiichi horie / ukifune

Files at this revision

API Documentation at this revision

Comitter:
shorie
Date:
Sat Jan 28 12:50:04 2017 +0000
Parent:
6:482c7c12ef76
Commit message:
Refactor the name of parameter of the get_button_state() API.

Changed in this revision

ukifune.cpp Show annotated file Show diff for this revision Revisions of this file
ukifune.h Show annotated file Show diff for this revision Revisions of this file
--- a/ukifune.cpp	Fri Jan 27 22:13:52 2017 +0000
+++ b/ukifune.cpp	Sat Jan 28 12:50:04 2017 +0000
@@ -132,7 +132,7 @@
     void get_button_state(
             uint32_t & pusshing, 
             uint32_t & releasing, 
-            uint32_t & pushed )
+            uint32_t & holding )
     {
         static int last_button  = 0;
         int current_button = 0;
@@ -148,7 +148,7 @@
         }
         
             // return pushed button
-        pushed = current_button; 
+        holding = current_button; 
         
             // buttons which are pushed from last state.
         pusshing =  ( last_button ^ current_button ) & current_button;
--- a/ukifune.h	Fri Jan 27 22:13:52 2017 +0000
+++ b/ukifune.h	Sat Jan 28 12:50:04 2017 +0000
@@ -68,15 +68,15 @@
         /**
         * \breif get the state of the button switches. 
         * \param pushing   [out] Bit map of the switch which is changing state from released to pushed. "1" is pushed. 
-        * \param releasing  [out] Bit map of the switch which is changing state from pushed to released. "1" is releasing.
-        * \param pushed   [out] Bit map of the switch which is pushed. "1" is pushed.
+        * \param releasing [out] Bit map of the switch which is changing state from pushed to released. "1" is releasing.
+        * \param holding   [out] Bit map of the switch which is kept pushed. "1" is holding.
         * \details
         * The bit position in the bit map are represented by enum SWITCH.
         */
     extern void get_button_state(
                         uint32_t & pushing, 
                         uint32_t & releasing, 
-                        uint32_t & pushed 
+                        uint32_t & holding 
                         );
     
         /**