-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.h
51 lines (40 loc) · 1.68 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
#define ADC_CHANNELS 2
#define ADC_OVERSAMPLING 4
#define ADC_VALUE_RANGE (1024*ADC_OVERSAMPLING)
#define CLOCKDELAY_DEADBAND_THRESHOLD (ADC_VALUE_RANGE/32/4)
#define DIVIDE_ADC_CHANNEL 0
#define DELAY_ADC_CHANNEL 1
/*
pin mappings
*/
#define MODE_SWITCH_DDR DDRD
#define MODE_SWITCH_PINS PIND
#define MODE_SWITCH_PORT PORTD
#define MODE_SWITCH_PIN_A PORTD6
#define MODE_SWITCH_PIN_B PORTD7
#define CLOCKDELAY_CLOCK_DDR DDRD
#define CLOCKDELAY_CLOCK_PORT PORTD
#define CLOCKDELAY_CLOCK_PINS PIND
#define CLOCKDELAY_CLOCK_PIN PORTD3
#define CLOCKDELAY_RESET_DDR DDRD
#define CLOCKDELAY_RESET_PORT PORTD
#define CLOCKDELAY_RESET_PINS PIND
#define CLOCKDELAY_RESET_PIN PORTD2
#define DIVIDE_OUTPUT_DDR DDRB
#define DIVIDE_OUTPUT_PINS PINB
#define DIVIDE_OUTPUT_PORT PORTB
#define DIVIDE_OUTPUT_PIN PORTB0
#define DELAY_OUTPUT_DDR DDRB
#define DELAY_OUTPUT_PINS PINB
#define DELAY_OUTPUT_PORT PORTB
#define DELAY_OUTPUT_PIN PORTB1
#define COMBINED_OUTPUT_DDR DDRB
#define COMBINED_OUTPUT_PINS PINB
#define COMBINED_OUTPUT_PORT PORTB
#define COMBINED_OUTPUT_PIN PORTB2
#define CLOCKDELAY_LEDS_DDR DDRB
#define CLOCKDELAY_LEDS_PORT PORTB
#define CLOCKDELAY_LEDS_PINS PINB
#define CLOCKDELAY_LED_1_PIN PORTB3
#define CLOCKDELAY_LED_2_PIN PORTB4
#define CLOCKDELAY_LED_3_PIN PORTB5