Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: HbUserOpe.cpp
- Revision:
- 26:732bc37fbefd
- Parent:
- 23:79e20be4bc5b
- Child:
- 30:13ada1a24c59
--- 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;
+}