Parsing input like "90 02 7F" is pretty straightforward. There is a string library
that contains an indexOf method. If the string contains a space, as it does after the first 0, there are two or more tokens in the string and the first token ends just before the space. If there is no space, there is only one token and it is the complete string.
Once you have tokens ("90", "02", "7F"), adding the 0x string in front is easy. Now you have "0x90", "0x02", and "0x7F".
You can then convert these strings to numbers (0x90, 0x02, 0x7F) using sscanf with the %x format specifier.