diff options
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; |
