Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef HWDEF_FT03_H | ||
#define HWDEF_FT03_H | ||
|
||
/* Astrolux FT03 driver layout | ||
* ---- | ||
* Reset -|1 8|- VCC | ||
* eswitch -|2 7|- aux LED | ||
* 1x7135 PWM -|3 6|- not used | ||
* GND -|4 5|- FET PWM | ||
* ---- | ||
*/ | ||
|
||
#define PWM_CHANNELS 2 | ||
|
||
#define AUXLED_PIN PB2 // pin 7 | ||
|
||
#define SWITCH_PIN PB3 // pin 2 | ||
#define SWITCH_PCINT PCINT3 // pin 2 pin change interrupt | ||
|
||
#define PWM1_PIN PB4 // pin 3, 1x7135 PWM | ||
#define PWM1_LVL OCR1B // output compare register for PB4 | ||
|
||
#define PWM2_PIN PB0 // pin 5, FET PWM | ||
#define PWM2_LVL OCR0A // output compare register for PB0 | ||
|
||
#define ADC_PRSCL 0x07 // clk/128 | ||
|
||
#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V | ||
|
||
#define FAST 0xA3 // fast PWM both channels | ||
#define PHASE 0xA1 // phase-correct PWM both channels | ||
|
||
#define LAYOUT_DEFINED | ||
|
||
#endif // HWDEF_FT03_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Astrolux FT03 config options for Anduril | ||
#include "hwdef-Astrolux_FT03.h" | ||
#undef MODEL_NUMBER | ||
#define MODEL_NUMBER "0599" | ||
|
||
#define USE_INDICATOR_LED | ||
#define USE_INDICATOR_LED_WHILE_RAMPING | ||
#define TICK_DURING_STANDBY | ||
#define STANDBY_TICK_SPEED 3 // every 0.128 s | ||
#define USE_FANCIER_BLINKING_INDICATOR | ||
|
||
// Copied from Emisar D4 | ||
#define RAMP_LENGTH 150 | ||
#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22,24,26,29,31,34,36,39,42,45,48,51,55,59,62,66,70,75,79,84,89,93,99,104,110,115,121,127,134,140,147,154,161,168,176,184,192,200,209,217,226,236,245,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0 | ||
#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,7,8,9,11,12,14,15,17,19,20,22,24,25,27,29,31,33,35,37,39,41,43,45,48,50,52,55,57,59,62,64,67,70,72,75,78,81,84,87,90,93,96,99,102,105,109,112,115,119,122,126,129,133,137,141,144,148,152,156,160,165,169,173,177,182,186,191,195,200,205,209,214,219,224,229,234,239,244,250,255 | ||
#define MAX_1x7135 65 | ||
#define HALFSPEED_LEVEL 14 | ||
#define QUARTERSPEED_LEVEL 6 | ||
|
||
#define RAMP_SMOOTH_FLOOR 1 | ||
#define RAMP_SMOOTH_CEIL 120 | ||
// 47, [65], 83, 101, 120 | ||
#define RAMP_DISCRETE_FLOOR 47 | ||
#define RAMP_DISCRETE_CEIL 120 | ||
#define RAMP_DISCRETE_STEPS 5 | ||
|
||
#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR | ||
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL | ||
#define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS | ||
|
||
#define THERM_FASTER_LEVEL 130 | ||
|
||
#define BLINK_AT_RAMP_CEILING | ||
#undef BLINK_AT_RAMP_MIDDLE | ||
#undef BLINK_AT_RAMP_FLOOR |