??? 05/07/08 22:56 Read: times |
#154554 - Unhelpful documentation Responding to: ???'s previous message |
Keil's documentation of the toascii() macro is really rather misleading:
Keil said:
Description: The toascii macro converts c to a 7-bit ASCII (sic) character. This macro clears all but the lower 7 bits of c.
Return Value: The toascii macro returns the 7-bit ASCII (sic) character for c. http://www.keil.com/support/m...oascii.htm This macro actually has nothing whatsoever to do with ASCII; it merely ensures that the top bit is clear - without any regard to ASCII or any other character encoding! I imagine that both the name of this macro and, in fact, its very existance, are merely a hangover of some historical implementation that happened to use the "spare" bit for something else? Maybe (some) UARTs used it to deliver the parity bit...? |