Changes to accomodate new sensors
PB control -> 2d stick Extra -> cap lip sensor Bite -> force sensitive resistor Lever -> pot 2d Stick added
This commit is contained in:
parent
e8aeb26399
commit
b401b34bb4
8 changed files with 150 additions and 143 deletions
|
|
@ -21,10 +21,14 @@ struct icm_result_t {
|
|||
float roll;
|
||||
};
|
||||
|
||||
enum Slider : uint8_t {
|
||||
SLIDER_PITCH_BEND = 0,
|
||||
SLIDER_EXTRA = 1,
|
||||
SLIDER_LEVER = 2,
|
||||
enum Control : uint8_t {
|
||||
CONTROL_PB = 0,
|
||||
CONTROL_PB_Y = 1,
|
||||
CONTROL_EXTRA = 2,
|
||||
CONTROL_LEVER = 3,
|
||||
CONTROL_STICK_X = 4,
|
||||
CONTROL_STICK_Y = 5,
|
||||
CONTROL_BITE = 6,
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -35,11 +39,9 @@ uint8_t buttonState(); // return true if the given buttons are pressed
|
|||
int readKnob(uint8_t n);
|
||||
int readTouchKey(uint8_t n);
|
||||
int readTouchRoller(uint8_t n);
|
||||
int readTouchUtil(uint8_t n);
|
||||
int readRawSlider(Slider id);
|
||||
int16_t readSlider(Slider id, int thr);
|
||||
int readRawControl(Control id);
|
||||
int16_t readControl(Control id, int thr);
|
||||
uint16_t keysTouched();
|
||||
uint16_t utilTouched();
|
||||
int readPressure();
|
||||
int readAltPressure();
|
||||
int readSpikePressure();
|
||||
|
|
@ -48,8 +50,8 @@ icm_result_t readICM();
|
|||
// xEVI hardware setup
|
||||
|
||||
// I2C
|
||||
#define MainI2CBus Wire1
|
||||
#define AuxI2CBus Wire
|
||||
#define MainI2CBus Wire
|
||||
#define AuxI2CBus Wire1
|
||||
#define KeysI2CAddr 0x5A
|
||||
#define RollerI2CAddr 0x5B
|
||||
#define UtilI2CAddr 0x5C
|
||||
|
|
@ -61,15 +63,15 @@ icm_result_t readICM();
|
|||
#define b4Pin 0
|
||||
|
||||
// Digital pins for encoder quadrature
|
||||
#define e1aPin 6
|
||||
#define e2aPin 8
|
||||
#define e3aPin 7
|
||||
#define e1aPin 8
|
||||
#define e2aPin 7
|
||||
#define e3aPin 6
|
||||
#define e4aPin 5
|
||||
|
||||
#define e1bPin 22
|
||||
#define e2bPin 21
|
||||
#define e3bPin 20
|
||||
#define e4bPin 23
|
||||
#define e1bPin 12
|
||||
#define e2bPin 11
|
||||
#define e3bPin 10
|
||||
#define e4bPin 9
|
||||
|
||||
// CV pins
|
||||
#define cvGatePin 9
|
||||
|
|
@ -107,13 +109,14 @@ icm_result_t readICM();
|
|||
#define R5Pin 10
|
||||
#define R6Pin 11
|
||||
|
||||
// Additional pins
|
||||
#define bitePin 0
|
||||
#define barPin 7
|
||||
#define pbSliderPin1 11
|
||||
#define pbSliderPin2 10
|
||||
#define leverSliderPin1 9
|
||||
#define leverSliderPin2 8
|
||||
#define extraSliderPin1 2
|
||||
#define extraSliderPin2 3
|
||||
// Control pins
|
||||
#define extraPin 0
|
||||
#define bitePin A6
|
||||
#define pbXPin A8
|
||||
#define pbYPin A9
|
||||
#define pbBPin 21
|
||||
#define stickXPin A10
|
||||
#define stickYPin A11
|
||||
#define leverPin A1
|
||||
#define stickBPin 14
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue