Function List

This page contains a list of all of the functions that can be called externally to their individual files.


adcInit() Called in recovery. Initialises the ADC registers and sets required pins multiplexed to the ADC.
adcEnable(char ref) Called before sampling. Turns on the ADC. If ref=1 turns on the reference voltage generator for 0-2.5v, then delays to allow the reference generator voltage to settle.
adcDisable() Called after sampling to save power. Turns off the ADC and reference voltage generator if enabled.
adcSample(char inchx, char srefx) Samples the ADC, inchx sets the input channel, srefx sets the reference voltage (slau049f.pdf - pg368).


ADCS(int *attitude) Initialises the ADC, sets the pins for the ADCS control signal to output, samples the ADCS XYZ axes using the ADC and stores the values to attitude, which should be a 3 value array.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.