Electronic – Where is the C API reference for the MSP430? CCS version

ciarmsp430texas instrumentsti-ccstudio

I see a lot of sample code and tutorials, but where is it documented that symbols (defines) such as P1OUT and P1DIR are available and what are their semantics?

I see a list with one-phrase comments in the header files, but that's the same as browsing through source code. I am looking for a technical document: an API reference or at least a Programmer's Guide.

Best Answer

The names of these defines match the names of the registers. The registers can be looked up in the datasheet for you model of MSP430 or in the family user guide. For instance, in case of MSP430FR5739 (1) the P1OUT and P1DIR are described section 8.4 of its family user guide (slau272b).

(1) Nothing special about it. Just the closest one to me at the moment of writing.
(2) P1OUT and P1DIR are just register names. Nobody calls them API in the [under]world of low level programming.

Also, find the place where they are defined in the source code. There may be comments.

The datasheet and the family user guide (when there is one) are required reading. You have to read them, or at least skim through them. There is no excuse for not reading them.