Add more validation to serial read state machine

This commit is contained in:
XANTRONIX Development 2016-06-02 22:54:59 -05:00
parent e8cfe8e77a
commit 445c52cdf4

View file

@ -198,8 +198,24 @@ int main() {
} }
case 2: { case 2: {
header.type = c; switch (c) {
i++; case 0x01:
case 0x02:
case 0x04:
case 0x08:
case 0x0f: {
header.type = c;
i++;
break;
}
default: {
i = 0;
break;
}
}
break; break;
} }