21 return (
float)(CS+1)/32.0 * (
vsense() ? 0.180 : 0.325)/(
Rsense+0.02) / 1.41421 * 1000;
25 uint8_t CS = 32.0*1.41421*mA/1000.0*(
Rsense+0.02)/0.325 - 1;
29 CS = 32.0*1.41421*mA/1000.0*(
Rsense+0.02)/0.180 - 1;
53 case 0xFFFFFFFF:
return 1;
67 case 256:
mres(0);
break;
68 case 128:
mres(1);
break;
69 case 64:
mres(2);
break;
70 case 32:
mres(3);
break;
71 case 16:
mres(4);
break;
72 case 8:
mres(5);
break;
73 case 4:
mres(6);
break;
74 case 2:
mres(7);
break;
75 case 0:
mres(8);
break;
97 case 16:
tbl(0b00);
break;
98 case 24:
tbl(0b01);
break;
99 case 36:
tbl(0b10);
break;
100 case 54:
tbl(0b11);
break;
106 case 0b00:
return 16;
107 case 0b01:
return 24;
108 case 0b10:
return 36;
109 case 0b11:
return 54;
125 TPOWERDOWN_register.sr = input;
126 write(TPOWERDOWN_register.address, TPOWERDOWN_register.sr);
135 TPWMTHRS_register.sr = input;
136 write(TPWMTHRS_register.address, TPWMTHRS_register.sr);
147 int16_t value = r.cur_a;
148 if (value > 255) value -= 512;
154 int16_t value = r.cur_b;
155 if (value > 255) value -= 512;