Surely byte should be typdef'd rather than hash-define'd?
(even better replace it with uint8_t).