diff options
| author | Selene ToyKeeper | 2023-10-04 12:05:50 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-10-04 12:05:50 -0600 |
| commit | 34c5e4dba130f04b36014d32e61a7ffc960bb79c (patch) | |
| tree | 0a5e4452953464101ecdfa14d0f3551e69c43244 /hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h | |
| parent | new light / driver: HDR boost driver by thefreeman (diff) | |
| download | anduril-34c5e4dba130f04b36014d32e61a7ffc960bb79c.tar.gz anduril-34c5e4dba130f04b36014d32e61a7ffc960bb79c.tar.bz2 anduril-34c5e4dba130f04b36014d32e61a7ffc960bb79c.zip | |
added thefreeman-boost-fwaa build, and made aux RGB voltage work on AA/NiMH
Diffstat (limited to 'hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h')
| -rw-r--r-- | hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h b/hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h index cf9a443..1c35014 100644 --- a/hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h +++ b/hwdef-thefreeman-boost21-mp3431-hdr-dac-argb.h @@ -84,7 +84,7 @@ enum CHANNEL_MODES { #define BST_ENABLE_PORT PORTC_OUT // HDR -// turns ON HDR FET for the high current range +// turns on HDR FET for the high current range #define HDR_ENABLE_PIN PIN4_bp #define HDR_ENABLE_PORT PORTB_OUT @@ -161,13 +161,14 @@ inline void hwdef_setup() { //PORTC.PIN0CTRL = PORT_PULLUPEN_bm; // EN //PORTC.PIN1CTRL = PORT_PULLUPEN_bm; // A - PORTC.PIN2CTRL = PORT_PULLUPEN_bm | PORT_ISC_BOTHEDGES_gc; // e-switch + PORTC.PIN2CTRL = PORT_PULLUPEN_bm + | PORT_ISC_BOTHEDGES_gc; // e-switch PORTC.PIN3CTRL = PORT_PULLUPEN_bm; // set up the DAC // https://ww1.microchip.com/downloads/en/DeviceDoc/ATtiny1614-16-17-DataSheet-DS40002204A.pdf // DAC ranges from 0V to (255 * Vref) / 256 - // also VREF_DAC0REFSEL_0V55_gc and VREF_DAC0REFSEL_1V1_gc and VREF_DAC0REFSEL_2V5_gc + // also VREF_DAC0REFSEL_0V55_gc and VREF_DAC0REFSEL_1V1_gc and VREF_DAC0REFSEL_2V5_gc VREF.CTRLA |= VREF_DAC0REFSEL_2V5_gc; VREF.CTRLB |= VREF_DAC0REFEN_bm; DAC0.CTRLA = DAC_ENABLE_bm | DAC_OUTEN_bm; |
