+ console_printpgm_noirq_P(PSTR("red = "));
+ console_printhex8_noirq(ledpwm_re);
+ console_printpgm_noirq_P(PSTR(", green = "));
+ console_printhex8_noirq(ledpwm_gr);
+ console_printpgm_noirq_P(PSTR(", blue = "));
+ console_printhex8_noirq(ledpwm_bl);
+ console_printpgm_noirq_P(PSTR(", brightness = "));
+ console_printhex8_noirq(ledpwm_bri);
+ console_printpgm_noirq_P(PSTR("\r\nvalues "));
+ for (v = 0; v < 3; v++) {
+ console_printhex8_noirq(ledpwm_val[v] >> 8);
+ console_printhex8_noirq(ledpwm_val[v] & 0xff);
+ console_printpgm_noirq_P(PSTR(" "));
+ }
+ } else if (strncmp_P(inputbuf, PSTR("r "), 2) == 0) {
+ uint8_t v;
+ v = strtoul(&inputbuf[2], NULL, 0);
+ ledpwm_re = v;
+ ledpwm_setled(LEDPWM_REDLED, ((uint16_t)ledpwm_re * ledpwm_bri));
+ console_printpgm_noirq_P(PSTR("RED value set to 0x"));
+ console_printhex8_noirq(v);
+ } else if (strncmp_P(inputbuf, PSTR("g "), 2) == 0) {
+ uint8_t v;
+ v = strtoul(&inputbuf[2], NULL, 0);
+ ledpwm_gr = v;
+ ledpwm_setled(LEDPWM_GREENLED, ((uint16_t)ledpwm_gr * ledpwm_bri));
+ console_printpgm_noirq_P(PSTR("GREEN value set to 0x"));
+ console_printhex8_noirq(v);
+ } else if (strncmp_P(inputbuf, PSTR("b "), 2) == 0) {
+ uint8_t v;
+ v = strtoul(&inputbuf[2], NULL, 0);
+ ledpwm_bl = v;
+ ledpwm_setled(LEDPWM_BLUELED, ((uint16_t)ledpwm_bl * ledpwm_bri));
+ console_printpgm_noirq_P(PSTR("BLUE value set to 0x"));
+ console_printhex8_noirq(v);
+ } else if (strncmp_P(inputbuf, PSTR("bri "), 2) == 0) {
+ uint8_t v;
+ v = strtoul(&inputbuf[4], NULL, 0);
+ ledpwm_bri = v;
+ ledpwm_set(ledpwm_re, ledpwm_gr, ledpwm_bl, ledpwm_bri);
+ console_printpgm_noirq_P(PSTR("brightness set to 0x"));
+ console_printhex8_noirq(v);
+ } else if (strcmp_P(inputbuf, PSTR("rfstatus")) == 0) {
+ uint32_t st;
+ st = rfm12_readstatus();
+ console_printpgm_noirq_P(PSTR("rfm12 status is "));
+ console_printhex8_noirq(st >> 24);
+ console_printhex8_noirq(st >> 16);
+ console_printhex8_noirq(st >> 8);
+ console_printhex8_noirq(st >> 0);