Browse Source

read back current and pwm limit

master
Olaf Rempel 10 years ago
parent
commit
c0eef162bd
  1. 14
      i2c-slave.c

14
i2c-slave.c

@ -160,7 +160,19 @@ ISR(TWI_vect)
case 0xB8:
switch (cmd) {
case CMD_WAIT:
data = 0x00; /* TODO: transmit Current and MaxPWM */
switch (bcnt++) {
case 0:
data = blmc.current & 0xFF;
break;
case 1:
data = 0xFF - blmc.pwm_limit;
break;
default:
data = 0xFF;
break;
}
break;
case CMD_READ_VERSION:

Loading…
Cancel
Save