1 #include <sancus/reactive.h> 2 3 #include <stdio.h> 4 5 6 #include "helpers.c" 7 8 #define SMNAME display 9 #define SNONCE 0xffac 10 11 SM_INPUT(SMNAME, input, data, len) 12 { 13 printf1("* SM display : got input -- "); 14 15 for (unsigned i = 0; i < len; i++) { 16 print_byte(data[i]); 17 } 18 19 printf1("- len: "); 20 print_byte(len >> (8*0)); 21 print_byte(len >> (8*1)); 22 printf1(" "); 23 24 if (len >= 5) { 25 printf1(" DISPLAY: "); 26 print_byte(data[4]); 27 } 28 29 printf1("\n"); 30 } 31