What do you know about binary coded decimal representation? That appears to be what the function's intended purpose is, which is a bigger issue than the type of pBcdBin.
But the type of pBcdBin is a pointer to zero or more bytes (that's what uin8_t represents here), where neother the pointer itself nor the bytes may be changed, they're both immutable. Technically you could simplify the function signature like so:
short BcdBin(unsigned char *pBcdBin);
This takes advantage of the fact that short int is at least 16 bits and unsigned char is at least 8 bits. The const qualifiers probably aren't necessary, but they make your life easier by enforcing immutability inside the function (ie. stop you from changing them accidentally).
deceptikon
Challenge Accepted
3,500 posts since Jan 2012
Reputation Points: 822
Solved Threads: 481
Skill Endorsements: 58