~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to ToyKeeper/hwdef-Mateminco_MF01-Mini.h

  • Committer: Selene Scriven
  • Date: 2020-07-06 20:24:28 UTC
  • mfrom: (188.1.294 fsm)
  • Revision ID: bzr@toykeeper.net-20200706202428-7pyen2ow9q2rtd9p
merged nearly a year of updates from the fsm branch, including the new product map

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef HWDEF_MF01_MINI_H
 
2
#define HWDEF_MF01_MINI_H
 
3
 
 
4
/* MF01-Mini driver layout
 
5
 *           ----
 
6
 *   Reset -|1  8|- VCC
 
7
 * eswitch -|2  7|- aux LEDs
 
8
 * FET PWM -|3  6|- PWM (7x7135)
 
9
 *     GND -|4  5|- PWM (1x7135)
 
10
 *           ----
 
11
 */
 
12
 
 
13
#define PWM_CHANNELS 3
 
14
 
 
15
#ifndef AUXLED_PIN
 
16
#define AUXLED_PIN   PB2    // pin 7
 
17
#endif
 
18
 
 
19
#ifndef SWITCH_PIN
 
20
#define SWITCH_PIN   PB3    // pin 2
 
21
#define SWITCH_PCINT PCINT3 // pin 2 pin change interrupt
 
22
#endif
 
23
 
 
24
#ifndef PWM1_PIN
 
25
#define PWM1_PIN PB0        // pin 5, 1x7135 PWM
 
26
#define PWM1_LVL OCR0A      // OCR0A is the output compare register for PB0
 
27
#endif
 
28
#ifndef PWM2_PIN
 
29
#define PWM2_PIN PB1        // pin 6, 7x7135 PWM
 
30
#define PWM2_LVL OCR0B      // OCR0B is the output compare register for PB1
 
31
#endif
 
32
#ifndef PWM3_PIN
 
33
#define PWM3_PIN PB4        // pin 3, FET PWM
 
34
#define PWM3_LVL OCR1B      // OCR1B is the output compare register for PB4
 
35
#endif
 
36
 
 
37
#define ADC_PRSCL   0x07    // clk/128
 
38
 
 
39
// average drop across diode on this hardware
 
40
#ifndef VOLTAGE_FUDGE_FACTOR
 
41
#define VOLTAGE_FUDGE_FACTOR 5  // add 0.25V
 
42
#endif
 
43
 
 
44
#define FAST 0xA3           // fast PWM both channels
 
45
#define PHASE 0xA1          // phase-correct PWM both channels
 
46
 
 
47
#define LAYOUT_DEFINED
 
48
 
 
49
#endif