Revision 448
moved new BOM code into trunk (wrapper functions, etc...). still need to research deprecated function warnings. FYI, get_max_bom(), bom_on(), and bom_off() are deprecated. See bom.h for new functions/usage.
bom.h | ||
---|---|---|
42 | 42 |
* @addtogroup bom |
43 | 43 |
* @{ |
44 | 44 |
**/ |
45 |
|
|
46 |
/** @brief Include all elements in the 16-bit bitfield **/ |
|
47 |
#define BOM_ALL 0xFFFF |
|
48 |
/** @brief Original BOM - No Range, No Individual LED control **/ |
|
49 |
#define BOM 0 |
|
50 |
/** @brief BOM 1.5 - No Range, Individual LED control **/ |
|
51 |
#define BOM15 1 |
|
52 |
/** @brief RBOM - Range, Individual LED control **/ |
|
53 |
#define RBOM 2 |
|
54 |
|
|
55 |
/** @brief Initialize the bom according to bom type **/ |
|
56 |
void bom_init(char type); |
|
57 |
/** @brief Refresh bom_val[] with new values from analog8. analog_init and bom_init must be called for this to work. **/ |
|
58 |
void bom_refresh(int bit_field); |
|
59 |
/** @brief Gets the bom reading from bom_val[which]. Call bom_refresh beforehand to read new bom values. **/ |
|
60 |
int bom_get(int which); |
|
61 |
/** @brief Compares all the values in bom_val[] and returns the index to the highest value element. **/ |
|
62 |
int bom_get_max(void); |
|
63 |
/** @brief Turns on the selected bom leds. Only works with BOM_ALL if using the original bom. **/ |
|
64 |
void bom_leds_on(int bit_field); |
|
65 |
/** @brief Turns off the selected bom leds. Only works with BOM_ALL if using the original bom. **/ |
|
66 |
void bom_leds_off(int bit_field); |
|
45 | 67 |
|
46 |
/** @brief Returns the location of the maximum BOM reading. **/
|
|
47 |
int get_max_bom( void );
|
|
48 |
/** @brief Turns the BOM on. **/
|
|
68 |
/** @brief (DEPRECATED) Gets and compares all bom values. Returns the index to the highest value element. **/
|
|
69 |
int get_max_bom(void);
|
|
70 |
/** @brief (DEPRECATED) Turns on all bom leds. **/
|
|
49 | 71 |
void bom_on(void); |
50 |
/** @brief Turns the BOM off. **/
|
|
72 |
/** @brief (DEPRECATED) Turns off all bom leds. **/
|
|
51 | 73 |
void bom_off(void); |
52 | 74 |
|
53 | 75 |
/** @} **/ |
Also available in: Unified diff