From 4d3d5984e81e9aeb9df0198280fa43f8fa243df8 Mon Sep 17 00:00:00 2001 From: Skot Date: Thu, 14 Nov 2024 10:15:37 -0500 Subject: [PATCH] always set beta comp and ideality on gamma EMC2101 init --- main/EMC2101.h | 3 +++ main/system.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/main/EMC2101.h b/main/EMC2101.h index 64fb79d0d..2e10445af 100644 --- a/main/EMC2101.h +++ b/main/EMC2101.h @@ -3,6 +3,9 @@ #include "i2c_bitaxe.h" +#define EMC2101_GAMMA_DEF_IDEALITY 0x37 +#define EMC2101_GAMMA_DEF_BETA 0x07 + #define EMC2101_I2CADDR_DEFAULT 0x4C ///< EMC2101 default i2c address #define EMC2101_CHIP_ID 0x16 ///< EMC2101 default device id from part id #define EMC2101_ALT_CHIP_ID 0x28 ///< EMC2101 alternate device id from part id diff --git a/main/system.c b/main/system.c index 2fc7fb9f5..47d56fd46 100644 --- a/main/system.c +++ b/main/system.c @@ -108,6 +108,9 @@ void SYSTEM_init_peripherals(GlobalState * GLOBAL_STATE) { case DEVICE_SUPRA: case DEVICE_GAMMA: EMC2101_init(nvs_config_get_u16(NVS_CONFIG_INVERT_FAN_POLARITY, 1)); + + EMC2101_configure_ideality(EMC2101_GAMMA_DEF_IDEALITY); + EMC2101_configure_beta_compensation(EMC2101_GAMMA_DEF_BETA); break; default: }