replace unsigned char with uint8_t, rename MAX_ESC_SIZE to ESCSEQ_SIZE