read back current and pwm limit

This commit is contained in:
Olaf Rempel 2011-06-05 18:23:29 +02:00
parent 5fa8d27b5c
commit c0eef162bd

View File

@ -160,7 +160,19 @@ ISR(TWI_vect)
case 0xB8: case 0xB8:
switch (cmd) { switch (cmd) {
case CMD_WAIT: 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; break;
case CMD_READ_VERSION: case CMD_READ_VERSION: