Revision 1051
Fixed some errors due to BOM being used instead of BOM10
trunk/code/projects/libdragonfly/bom.c | ||
---|---|---|
220 | 220 |
/** |
221 | 221 |
* Iterates through each bit in the bit_field. If the bit is set, the corresponding emitter will |
222 | 222 |
* be enabled to turn on when bom_on() is called. |
223 |
* bom_init must be called for this to work. |
|
223 |
* bom_init must be called for this to work. Does nothing if a BOM1.0 is installed
|
|
224 | 224 |
* |
225 |
* @param bit_field specifies which leds should be turned on. Use BOM_ALL to turn on all bom leds. |
|
225 |
* @param bit_field specifies which leds should be turned on when bom_on is called. Use BOM_ALL to turn on all bom leds.
|
|
226 | 226 |
* Ex. if 0x0005 is passed, leds 0 and 2 will be turned on. |
227 | 227 |
**/ |
228 | 228 |
void bom_set_leds(int bit_field) { |
229 | 229 |
int i; |
230 | 230 |
unsigned int mask = 1<<(NUM_BOM_LEDS-1); |
231 | 231 |
switch(bom_type) { |
232 |
case BOM: |
|
233 |
if(bit_field == BOM_ALL) |
|
234 |
digital_output(MONKL, 1); |
|
232 |
case BOM10: |
|
233 |
//TODO: put an assert here to alert the user that this should not be called |
|
235 | 234 |
break; |
236 | 235 |
|
237 | 236 |
case BOM15: |
... | ... | |
299 | 298 |
void bom_off(void) |
300 | 299 |
{ |
301 | 300 |
switch(bom_type) { |
302 |
case BOM: |
|
301 |
case BOM10:
|
|
303 | 302 |
digital_output(MONKL, 0); |
304 | 303 |
break; |
305 | 304 |
case BOM15: |
... | ... | |
314 | 313 |
|
315 | 314 |
//select a detector to read |
316 | 315 |
static void bom_select(char which) { |
317 |
if(bom_type == BOM) |
|
316 |
if(bom_type == BOM10)
|
|
318 | 317 |
which = lookup[(int)which]; |
319 | 318 |
|
320 | 319 |
if (which&8) |
Also available in: Unified diff