1
#ifndef HWDEF_TRIPLEDOWN_H
2
#define HWDEF_TRIPLEDOWN_H
4
/* Tripledown driver layout
7
* OTC -|2 7|- Voltage ADC
8
* PWM (FET) -|3 6|- PWM (6x7135)
9
* GND -|4 5|- PWM (1x7135)
13
#define STAR2_PIN PB0 // If this pin isn't used for ALT_PWM
15
#define CAP_PIN PB3 // pin 2, OTC
16
#define CAP_CHANNEL 0x03 // MUX 03 corresponds with PB3 (Star 4)
17
#define CAP_DIDR ADC3D // Digital input disable bit corresponding with PB3
19
#define PWM_PIN PB1 // pin 6, 6x7135 PWM
20
#define PWM_LVL OCR0B // OCR0B is the output compare register for PB1
21
#define ALT_PWM_PIN PB0 // pin 5, 1x7135 PWM
22
#define ALT_PWM_LVL OCR0A // OCR0A is the output compare register for PB0
23
#define FET_PWM_PIN PB4 // pin 3
24
#define FET_PWM_LVL OCR1B // output compare register for PB4
26
#define VOLTAGE_PIN PB2 // pin 7, voltage ADC
27
#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2
28
#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2
29
#define ADC_PRSCL 0x06 // clk/64
31
//#define TEMP_DIDR ADC4D
32
#define TEMP_CHANNEL 0b00001111
34
#define FAST 0xA3 // fast PWM both channels
35
#define PHASE 0xA1 // phase-correct PWM both channels
37
#define LAYOUT_DEFINED