Pass name string into I2C DIMM detectors, store name in KingstonFuryDRAMController to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-17 01:17:02 -05:00
parent c82a6052a2
commit 676547b8b0
11 changed files with 222 additions and 242 deletions

View file

@ -16,12 +16,12 @@
#include "RGBController.h"
#include "LogManager.h"
KingstonFuryDRAMController::KingstonFuryDRAMController(
i2c_smbus_interface* bus, unsigned char base_addr, std::vector<int> slots)
KingstonFuryDRAMController::KingstonFuryDRAMController(i2c_smbus_interface* bus, unsigned char base_addr, std::vector<int> slots, std::string dev_name)
{
this->bus = bus;
this->base_addr = base_addr;
this->slots = slots;
this->name = dev_name;
reg_cache.resize(slots.size());
}
@ -47,6 +47,11 @@ std::string KingstonFuryDRAMController::GetDeviceLocation()
return("I2C: " + return_string);
}
std::string KingstonFuryDRAMController::GetDeviceName()
{
return(name);
}
unsigned int KingstonFuryDRAMController::GetLEDCount()
{
return(GetLEDPerDIMM() * (unsigned int)slots.size());