setup

=setup= Owner: Everyone

Purpose and Documentation
This is where all of the register initialization occurs. Appropriate bits are set in registers, and interrupts are unmasked, etc. Inital values for settings are also set here.

Make sure you only modify the relevant bit of the register that you need - not the whole thing. You might end up overwriting other people's values!

Syntax
void setup(void)

Usage
This needs to be the first function called by main. It should only be called once per run of the program.

Input Arguments

 * void. This function takes no arguments.

Output Arguments

 * None. This function does not make changes to any existing values.

Return Value

 * void. There is no return value.

Read

 * None.

Write

 * Various. This function sets the initial values of the settings object.

Operation
One by one, the PIC's registers are set to the appropriate values. Then, the settings are initialized.

Code
void setup(void) { /*Initalize values here*/ }