1
#ifndef HWDEF_MF01_MINI_H
2
#define HWDEF_MF01_MINI_H
4
/* MF01-Mini driver layout
7
* eswitch -|2 7|- aux LEDs
8
* FET PWM -|3 6|- PWM (7x7135)
9
* GND -|4 5|- PWM (1x7135)
13
#define PWM_CHANNELS 3
16
#define AUXLED_PIN PB2 // pin 7
20
#define SWITCH_PIN PB3 // pin 2
21
#define SWITCH_PCINT PCINT3 // pin 2 pin change interrupt
25
#define PWM1_PIN PB0 // pin 5, 1x7135 PWM
26
#define PWM1_LVL OCR0A // OCR0A is the output compare register for PB0
29
#define PWM2_PIN PB1 // pin 6, 7x7135 PWM
30
#define PWM2_LVL OCR0B // OCR0B is the output compare register for PB1
33
#define PWM3_PIN PB4 // pin 3, FET PWM
34
#define PWM3_LVL OCR1B // OCR1B is the output compare register for PB4
37
#define ADC_PRSCL 0x07 // clk/128
39
// average drop across diode on this hardware
40
#ifndef VOLTAGE_FUDGE_FACTOR
41
#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V
44
#define FAST 0xA3 // fast PWM both channels
45
#define PHASE 0xA1 // phase-correct PWM both channels
47
#define LAYOUT_DEFINED