+ if(rx_fill==0xFF)
+ {
+ if(c==':')
+ rx_fill = 0;
+ }
+ else if(c=='.')
+ {
+ if(rx_buf[0]=='S' && rx_fill==4)
+ {
+ offset = (decode_hex(rx_buf[1])<<8) | (decode_hex(rx_buf[2])<<4) | decode_hex(rx_buf[3]);
+ nibbles = (offset&3)+1;
+ offset &= 0xFFC;
+
+ eeprom_write(0, 0xA5);
+ eeprom_write(1, offset>>8);
+ eeprom_write(2, offset);
+ eeprom_write(3, nibbles);
+ }
+ rx_fill = 0xFF;
+ }
+ else
+ {
+ if(rx_fill<sizeof(rx_buf))
+ rx_buf[rx_fill++] = c;
+ else
+ rx_fill = 0xFF;
+ }