Project

General

Profile

Revision 1461

Added by Brad Neuman over 14 years ago

updated all the library code to have sensible _init behavior.
Almost all of the library components have a global variable which gets set after init and the functions inside will fail with an error code if init has not been called. Also, the init functions themselves check this variable and will bail out without doing any damage if that init has already been called

View differences:

analog.h
113 113

  
114 114
/** @brief Initialize analog ports. Will start running a loop
115 115
    if start_conversion is ADC_START.**/
116
void analog_init(int start_conversion);
116
int analog_init(int start_conversion);
117 117
/** @brief starts the analog loop. Doesn't do anything if the loop is already running. **/
118
void analog_start_loop(void);
118
int analog_start_loop(void);
119 119
/** @brief Stops the analog loop. Doesn't do anything if the loop is already stopped. **/
120
void analog_stop_loop(void);
120
int analog_stop_loop(void);
121 121
/** @brief Returns the status of the analog loop. **/
122 122
int analog_loop_status(void);
123 123
/** @brief Returns an 8-bit analog value from the look up table. Use this instead of analog_get8. **/

Also available in: Unified diff