1.4.1 PI_init ()
This function has three primary responsibilities:
- Initialize the communication peripheral so that it is in a state to begin receiving data.
- Initialize the device clock system (usually 8 MHz but can be anything as other code is independent).
- Set the BSL430_Command_Interpreter values "BSL430_ReceiveBuffer" and "BSL430_SendBuffer" to the location where data packets will be stored. This can be the same buffer in RAM (such as for UART) or different locations used by a peripheral (such as for USB). It should be noted that these pointers need to point to the first byte in the BSL Core Command. So if a Peripheral Interface buffer uses a larger buffer in RAM for wrapper bytes, these pointers should point inside that buffer.