-
Notifications
You must be signed in to change notification settings - Fork 9
/
device.h
55 lines (46 loc) · 2.21 KB
/
device.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#define ADC_CHANNELS 6
#define ADC_OVERSAMPLING 4
#define ADC_VALUE_RANGE (1024*ADC_OVERSAMPLING)
#define SEQUENCER_BITS_TYPE uint16_t
#define SEQUENCER_STEPS_RANGE 16
#define SEQUENCER_STEP_SCALING_FACTOR 8
#define SEQUENCER_DEADBAND_THRESHOLD (ADC_VALUE_RANGE/SEQUENCER_STEPS_RANGE/4)
#define SEQUENCER_FILL_A_CONTROL 0
#define SEQUENCER_FILL_B_CONTROL 1
#define SEQUENCER_STEP_A_CONTROL 2
#define SEQUENCER_STEP_B_CONTROL 3
#define SEQUENCER_ROTATE_A_CONTROL 4
#define SEQUENCER_ROTATE_B_CONTROL 5
#define SEQUENCER_CLOCK_DDR DDRD
#define SEQUENCER_CLOCK_PORT PORTD
#define SEQUENCER_CLOCK_PINS PIND
#define SEQUENCER_CLOCK_PIN PORTD3
#define SEQUENCER_RESET_DDR DDRD
#define SEQUENCER_RESET_PORT PORTD
#define SEQUENCER_RESET_PINS PIND
#define SEQUENCER_RESET_PIN PORTD2
#define SEQUENCER_OUTPUT_DDR DDRB
#define SEQUENCER_OUTPUT_PORT PORTB
#define SEQUENCER_OUTPUT_PINS PINB
#define SEQUENCER_OUTPUT_PIN_A PORTB0
#define SEQUENCER_OUTPUT_PIN_B PORTB1
#define SEQUENCER_TRIGGER_SWITCH_DDR DDRD
#define SEQUENCER_TRIGGER_SWITCH_PORT PORTD
#define SEQUENCER_TRIGGER_SWITCH_PINS PIND
#define SEQUENCER_TRIGGER_SWITCH_PIN_A PORTD4
#define SEQUENCER_TRIGGER_SWITCH_PIN_B PORTD6
#define SEQUENCER_ALTERNATE_SWITCH_DDR DDRD
#define SEQUENCER_ALTERNATE_SWITCH_PORT PORTD
#define SEQUENCER_ALTERNATE_SWITCH_PINS PIND
#define SEQUENCER_ALTERNATE_SWITCH_PIN_A PORTD5
#define SEQUENCER_ALTERNATE_SWITCH_PIN_B PORTD7
#define SEQUENCER_CHAINED_SWITCH_DDR DDRB
#define SEQUENCER_CHAINED_SWITCH_PORT PORTB
#define SEQUENCER_CHAINED_SWITCH_PINS PINB
#define SEQUENCER_CHAINED_SWITCH_PIN PORTB2
#define SEQUENCER_LEDS_DDR DDRB
#define SEQUENCER_LEDS_PORT PORTB
#define SEQUENCER_LEDS_PINS PINB
#define SEQUENCER_LED_A_PIN PORTB4
#define SEQUENCER_LED_B_PIN PORTB3
#define SEQUENCER_LED_C_PIN PORTB5