396.1.1
by Selene Scriven
Reworked the config file include system so it'll include the #defined value |
1 |
#ifndef HWDEF_FET_7135_H
|
2 |
#define HWDEF_FET_7135_H
|
|
3 |
||
342
by Selene Scriven
Refactored driver/hardware definition code to be one file per driver type. |
4 |
/* FET + 7135 driver layout
|
5 |
* ----
|
|
6 |
* Reset -|1 8|- VCC
|
|
7 |
* OTC -|2 7|- Voltage ADC
|
|
8 |
* Star 3 -|3 6|- PWM (FET)
|
|
9 |
* GND -|4 5|- PWM (1x7135)
|
|
10 |
* ----
|
|
11 |
*/
|
|
12 |
||
13 |
#define STAR2_PIN PB0 // If this pin isn't used for ALT_PWM |
|
14 |
#define STAR3_PIN PB4 // pin 3 |
|
15 |
||
16 |
#define CAP_PIN PB3 // pin 2, OTC |
|
17 |
#define CAP_CHANNEL 0x03 // MUX 03 corresponds with PB3 (Star 4) |
|
18 |
#define CAP_DIDR ADC3D // Digital input disable bit corresponding with PB3 |
|
19 |
||
20 |
#define PWM_PIN PB1 // pin 6, FET PWM |
|
21 |
#define PWM_LVL OCR0B // OCR0B is the output compare register for PB1 |
|
22 |
#define ALT_PWM_PIN PB0 // pin 5, 1x7135 PWM |
|
23 |
#define ALT_PWM_LVL OCR0A // OCR0A is the output compare register for PB0 |
|
24 |
||
25 |
#define VOLTAGE_PIN PB2 // pin 7, voltage ADC |
|
26 |
#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2 |
|
27 |
#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2 |
|
28 |
#define ADC_PRSCL 0x06 // clk/64 |
|
29 |
||
30 |
//#define TEMP_DIDR ADC4D
|
|
31 |
#define TEMP_CHANNEL 0b00001111
|
|
32 |
||
33 |
#define FAST 0xA3 // fast PWM both channels |
|
34 |
#define PHASE 0xA1 // phase-correct PWM both channels |
|
35 |
||
396.1.1
by Selene Scriven
Reworked the config file include system so it'll include the #defined value |
36 |
#define LAYOUT_DEFINED
|
37 |
||
38 |
#endif
|