Companion9x compilation

This commit is contained in:
bsongis
2013-01-23 07:18:35 +00:00
parent a157f0e22a
commit 469346178a
2 changed files with 19 additions and 25 deletions
+3 -9
View File
@@ -147,15 +147,9 @@ uint8_t spare4:2
PACK(typedef struct t_EEGeneral {
uint8_t version;
uint16_t variant;
#if defined(PCBX9D)
int16_t calibMid[8];
int16_t calibSpanNeg[8];
int16_t calibSpanPos[8];
#else
int16_t calibMid[7];
int16_t calibSpanNeg[7];
int16_t calibSpanPos[7];
#endif
int16_t calibMid[NUM_STICKS+NUM_POTS];
int16_t calibSpanNeg[NUM_STICKS+NUM_POTS];
int16_t calibSpanPos[NUM_STICKS+NUM_POTS];
uint16_t chkSum;
int8_t currModel;
uint8_t contrast;
+16 -16
View File
@@ -216,6 +216,22 @@ extern void boardInit();
#include <avr/wdt.h>
#endif
#define NUM_STICKS 4
#if defined(PCBX9D) || defined(PCBACT)
#define NUM_SWITCHES 8
#define IS_3POS(sw) ((sw) != 5 && (sw) != 7)
#define MAX_PSWITCH (SW_SH2-SW_SA0+1)
#define NUM_POTS 4
#define NUM_SW_SRCRAW 8
#else
#define NUM_SWITCHES 7
#define IS_3POS(sw) ((sw) == 3)
#define MAX_PSWITCH (SW_TRN-SW_THR+1) // 9 physical switches
#define NUM_POTS 3
#define NUM_SW_SRCRAW 1
#endif
#include "myeeprom.h"
#if ROTARY_ENCODERS > 0
@@ -685,22 +701,6 @@ enum CswFunctions {
#define CS_VDIFF 3
#define CS_STATE(x) ((x)<CS_AND ? CS_VOFS : ((x)<CS_EQUAL ? CS_VBOOL : ((x)<CS_DIFFEGREATER ? CS_VCOMP : CS_VDIFF)))
#define NUM_STICKS 4
#if defined(PCBX9D) || defined(PCBACT)
#define NUM_SWITCHES 8
#define IS_3POS(sw) ((sw) != 5 && (sw) != 7)
#define MAX_PSWITCH (SW_SH2-SW_SA0+1)
#define NUM_POTS 4
#define NUM_SW_SRCRAW 8
#else
#define NUM_SWITCHES 7
#define IS_3POS(sw) ((sw) == 3)
#define MAX_PSWITCH (SW_TRN-SW_THR+1) // 9 physical switches
#define NUM_POTS 3
#define NUM_SW_SRCRAW 1
#endif
#define MAX_SWITCH (MAX_PSWITCH+NUM_CSW)
#define SWITCH_ON (1+MAX_SWITCH)
#define SWITCH_OFF (-SWITCH_ON)