Split Values in a string

*,&. eg. *23,-25&

STATE 0 -
if the character is *, set the first number is 0 and move to state 1.
anything else, stay ion state 0

STATE 1 - if the character is a digit, multiply the first number by 10 and add (characfter-'0') to it. stay in state 1
if the character is a comma, set the second number to 0 and move to state 2
anything else, move to state 0

STATE 2 - if the character is a digit, multiply the second number by 10 and add (characfter-'0') to it. stay in state 2
if the character is an ampersand, hooray! you have read a packet. Do stuff and go back to state 0
anything else, move to state 0