Revision 729
Fixed the issue with green and blue channels coming faintly on at startup. BOM led issues debugged (the JTAG fuse was incorrectly set). lbom now in working order.
lbom.c | ||
---|---|---|
60 | 60 |
set_leds(BOM_ALL_ON); |
61 | 61 |
DDRC |= _BV(BOM0)|_BV(BOM1)|_BV(BOM2)|_BV(BOM3); |
62 | 62 |
DDRD |= _BV(DDD7); //sets bom carrier to write |
63 |
|
|
63 | 64 |
bom_mode = type; |
64 |
usb_puti(DDRC); |
|
65 | 65 |
switch(bom_mode){ |
66 | 66 |
case RBOM: |
67 | 67 |
//set the carrier to produce a 31kHz 50% duty cycle signal |
... | ... | |
74 | 74 |
PORTD |= _BV(PD7); |
75 | 75 |
} |
76 | 76 |
} |
77 |
/** @brief Turns the LBOM on. **/
|
|
77 |
/** @brief Turns the enabled LBOM LEDS on. **/
|
|
78 | 78 |
void bom_on(void){ |
79 | 79 |
PORTC |= led_mask; |
80 |
usb_putc('N'); |
|
81 |
usb_puti(PORTC); |
|
82 | 80 |
} |
83 |
/** @brief Turns the LBOM off. **/ |
|
81 |
|
|
82 |
/** @brief Turns all LBOM LEDS off. **/ |
|
84 | 83 |
void bom_off(void){ |
85 |
PORTC &= ~led_mask; |
|
86 |
usb_putc('F'); |
|
87 |
usb_puti(PORTC); |
|
84 |
PORTC &= ~(BOM_ALL_ON<<4); |
|
88 | 85 |
} |
89 |
/** @brief Sets which emitters are in use. **/ |
|
86 |
|
|
87 |
/** @brief Sets which emitters are enabled **/ |
|
90 | 88 |
void set_leds(int bit_field){ |
91 | 89 |
led_mask = ((bit_field&BOM_ALL_ON) << 4); |
92 |
usb_puti(led_mask); |
|
93 | 90 |
} |
94 | 91 |
|
95 | 92 |
/** @} **/ //end group |
Also available in: Unified diff