~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to ToyKeeper/hwdef-Tripledown.h

  • Committer: Selene Scriven
  • Date: 2015-03-17 08:56:50 UTC
  • mto: This revision was merged to the branch mainline in revision 124.
  • Revision ID: ubuntu@toykeeper.net-20150317085650-s89wr9h28n2co7z1
Added TheStar firmwares from _the_

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef HWDEF_TRIPLEDOWN_H
2
 
#define HWDEF_TRIPLEDOWN_H
3
 
 
4
 
/* Tripledown driver layout
5
 
 *             ----
6
 
 *     Reset -|1  8|- VCC
7
 
 *       OTC -|2  7|- Voltage ADC
8
 
 * PWM (FET) -|3  6|- PWM (6x7135)
9
 
 *       GND -|4  5|- PWM (1x7135)
10
 
 *             ----
11
 
 */
12
 
 
13
 
#define STAR2_PIN   PB0     // If this pin isn't used for ALT_PWM
14
 
 
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
18
 
 
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
25
 
 
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
30
 
 
31
 
//#define TEMP_DIDR   ADC4D
32
 
#define TEMP_CHANNEL 0b00001111
33
 
 
34
 
#define FAST 0xA3           // fast PWM both channels
35
 
#define PHASE 0xA1          // phase-correct PWM both channels
36
 
 
37
 
#define LAYOUT_DEFINED
38
 
 
39
 
#endif