[Taranis] Issue #592 - Sticky switches

This commit is contained in:
Bertrand Songis
2014-02-03 11:22:06 +01:00
parent 7c81920431
commit 9730f8d190
4 changed files with 73 additions and 23 deletions
+13 -1
View File
@@ -639,7 +639,11 @@ enum CswFunctions {
CS_DIFFEGREATER,
CS_ADIFFEGREATER,
CS_TIMER,
CS_MAXF = CS_TIMER
#if defined(CPUARM)
CS_STICKY,
#endif
CS_COUNT,
CS_MAXF = CS_COUNT-1
};
#define CS_VOFS 0
@@ -647,9 +651,17 @@ enum CswFunctions {
#define CS_VCOMP 2
#define CS_VDIFF 3
#define CS_VTIMER 4
#define CS_VSTICKY 5
uint8_t cswFamily(uint8_t func);
int16_t cswTimerValue(int8_t val);
#if defined(CPUARM)
#define IS_VSTICKY(val) ((val) == CS_VSTICKY)
#else
#define IS_VSTICKY(val) (0)
#endif
#define NUM_CYC 3
#define NUM_CAL_PPM 4
#define NUM_PPM 8