3 static int steffen_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS],int16_t bits_per_row[BITBUF_ROWS]) {
5 if (bb[0][0]==0x00 && ((bb[1][0]&0x07)==0x07) && bb[1][0]==bb[2][0] && bb[2][0]==bb[3][0]) {
7 fprintf(stderr, "BUTTON:TYPE=STEFFAN,");
8 fprintf(stderr, "CODE=%d%d%d%d%d,", (bb[1][0]&0x80)>>7, (bb[1][0]&0x40)>>6, (bb[1][0]&0x20)>>5, (bb[1][0]&0x10)>>4, (bb[1][0]&0x08)>>3);
10 if ((bb[1][2]&0x0f)==0x0e)
11 fprintf(stdout, "PRESSED=A,");
12 else if ((bb[1][2]&0x0f)==0x0d)
13 fprintf(stdout, "PRESSED=B,");
14 else if ((bb[1][2]&0x0f)==0x0b)
15 fprintf(stdout, "PRESSED=C,");
16 else if ((bb[1][2]&0x0f)==0x07)
17 fprintf(stdout, "PRESSED=D,");
18 else if ((bb[1][2]&0x0f)==0x0f)
19 fprintf(stdout, "PRESSED=ALL,");
21 fprintf(stdout, "PRESSED=UNKNOWN,");
23 if ((bb[1][2]&0xf0)==0xf0) {
24 fprintf(stdout, "STATE=OFF\n");
26 fprintf(stdout, "STATE=ON\n");
30 debug_callback(bb, bits_per_row);
39 /* .name = */ "Steffen Switch Transmitter",
40 /* .modulation = */ OOK_PWM_D,
41 /* .short_limit = */ 140,
42 /* .long_limit = */ 270,
43 /* .reset_limit = */ 1500,
44 /* .json_callback = */ &steffen_callback,