teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Revision:
26:732bc37fbefd
Parent:
23:79e20be4bc5b
Child:
30:13ada1a24c59
diff -r f3a6e7eec9c3 -r 732bc37fbefd HbUserOpe.cpp
--- a/HbUserOpe.cpp	Wed Dec 12 23:52:22 2018 +0000
+++ b/HbUserOpe.cpp	Thu Dec 13 12:15:35 2018 +0000
@@ -29,6 +29,16 @@
 //    UINT16 mask = 0x1 << styp;
 //    return curOpe.w & mask;
 }
+bool HbUserOpe::ChkCtrlSW(SW_TYPE2 styp)
+{
+            if(styp == F_L){return curOpe.bf.axl_r;}
+    else    if(styp == F_R){return curOpe.bf.axl_l;}
+    else    if(styp == R_L){return curOpe.bf.stop;}
+    else    if(styp == R_R){return curOpe.bf.y_ctrl;}
+    else/*if(styp == ENG_STOP)*/{return curOpe.bf.eng_stop;}
+//    UINT16 mask = 0x1 << styp;
+//    return curOpe.w & mask;
+}
 bool HbUserOpe::ChkCtrlSwAny()
 {
     UINT16 mask = 0x1;
@@ -40,3 +50,13 @@
     }
     return false;
 }
+bool HbUserOpe::ChkCtrlSwRiseEdge(SW_TYPE2 styp)
+{
+            if(styp == F_L){return curOpe.bf.axl_r && !oldOpe.bf.axl_r;}
+    else    if(styp == F_R){return curOpe.bf.axl_l && !oldOpe.bf.axl_l;}
+    else    if(styp == R_L){return curOpe.bf.stop && !oldOpe.bf.stop;}
+    else    if(styp == R_R){return curOpe.bf.y_ctrl && !oldOpe.bf.y_ctrl;}
+    else/*if(styp == ENG_STOP)*/{return curOpe.bf.eng_stop && !oldOpe.bf.eng_stop;}
+//    UINT16 mask = 0x1 << styp;
+//    return curOpe.w & mask;
+}