Implement Silicom card features #1

Merged
DataHoarder merged 12 commits from implement-silicom-card into master 2021-10-28 05:16:53 +00:00
Showing only changes of commit d7b5a8acac - Show all commits

View file

@ -5532,8 +5532,8 @@ fm_status fmPlatformLibSetVrmVoltage(fm_int sw,
{
printf("vrm mVolt %d delta %d\n", mVolt, hwResId->vrm.delta);
uint voltageCalc = (mVolt + hwResId->vrm.delta) / 5 - 49;
data[1] = (char) voltageCalc;
printf("vrm channel %d data 0x%x\n", channel, voltageCalc & 0xff);
data[1] = voltageCalc;
printf("vrm channel %d data 0x%x\n", channel, voltageCalc);
fflush(stdout);
if(channel == 0){
@ -5542,7 +5542,7 @@ fm_status fmPlatformLibSetVrmVoltage(fm_int sw,
data[0] = 0x27;
}
for(uint i; i < 0x32; ++i){
for(uint i = 0; i < 0x32; ++i){
status = i2c->writeReadFunc(i2c->handle, vrmI2c->addr, data, 2, 0);
if(status == FM_OK){
status = i2c->writeReadFunc(i2c->handle, vrmI2c->addr, data, 0, 1);