@@ -31,8 +31,9 @@ static const char* ene_channels[] = /* ENE channel strings
3131
3232ENESMBusController::ENESMBusController (ENESMBusInterface* interface, ene_dev_id dev)
3333{
34- this ->interface = interface;
35- this ->dev = dev;
34+ this ->interface = interface;
35+ this ->dev = dev;
36+ supports_mode_14 = false ;
3637
3738 UpdateDeviceName ();
3839
@@ -93,6 +94,17 @@ ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id
9394 direct_reg = ENE_REG_COLORS_DIRECT_V2;
9495 effect_reg = ENE_REG_COLORS_EFFECT_V2;
9596 channel_cfg = ENE_CONFIG_CHANNEL_V1;
97+
98+ // Check for Mode 14 support, only known to exist on modules where the
99+ // DRAM 3 zone ID exists
100+ for (std::size_t cfg_zone_idx = 0 ; cfg_zone_idx < ENE_NUM_ZONES; cfg_zone_idx++)
101+ {
102+ if (config_table[channel_cfg + cfg_zone_idx] == (unsigned char )ENE_LED_CHANNEL_DRAM_3)
103+ {
104+ supports_mode_14 = true ;
105+ break ;
106+ }
107+ }
96108 }
97109 // AUMA0-E6K5-0106 - Second generation motherboard controller
98110 else if (strcmp (device_name, " AUMA0-E6K5-0106" ) == 0 )
@@ -371,6 +383,11 @@ void ENESMBusController::SetMode(unsigned char mode, unsigned char speed, unsign
371383 ENERegisterWrite (ENE_REG_APPLY, ENE_APPLY_VAL);
372384}
373385
386+ bool ENESMBusController::SupportsMode14 ()
387+ {
388+ return (supports_mode_14);
389+ }
390+
374391void ENESMBusController::UpdateDeviceName ()
375392{
376393 for (int i = 0 ; i < 16 ; i++)
0 commit comments