??? 01/29/12 10:03 Read: times |
#185711 - I do similar for GPIO on "normal" processors Responding to: ???'s previous message |
That is similar to what I normally do with pin names when using processors with "normal" GPIO ports and not direct bit access to each bit.
By encoding the port name in the signal name, I can do: GPIO3_OUTPUTS = (1<<P3_POWER_MODE) | (1<<P3_BATT_ON) If a new hw revision moves a signal, I will get a compilation error and so will instantly catch what changes I need to do to make sure that the correct pin on the correct port will be configured as input or output - and will be read from or written to. It's really important to use the assember or compiler to the fullest to catch required changes or invalid assumptions. |