Implement Silicom card features #1
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue