Browse Source

read back current and pwm limit

master
Olaf Rempel 9 years ago
parent
commit
c0eef162bd
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      i2c-slave.c

+ 13
- 1
i2c-slave.c View File

@@ -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