mirror of
https://github.com/markqvist/OpenModem.git
synced 2025-12-15 08:28:47 -05:00
LED driver implemented
This commit is contained in:
parent
fa1d89d0e3
commit
6258e1e62e
7 changed files with 53 additions and 49 deletions
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
// TODO: Remove testing vars ////
|
||||
#define SAMPLES_TO_CAPTURE 128
|
||||
uint32_t capturedsamples = 0;
|
||||
ticks_t capturedsamples = 0;
|
||||
uint8_t samplebuf[SAMPLES_TO_CAPTURE];
|
||||
/////////////////////////////////
|
||||
|
||||
extern volatile uint32_t _clock;
|
||||
extern volatile ticks_t _clock;
|
||||
extern unsigned long custom_preamble;
|
||||
extern unsigned long custom_tail;
|
||||
|
||||
|
|
@ -24,6 +24,8 @@ int afsk_putchar(char c, FILE *stream);
|
|||
|
||||
// ADC and clock setup
|
||||
void AFSK_hw_init(void) {
|
||||
_clock = 0;
|
||||
|
||||
// Run ADC initialisation
|
||||
AFSK_adc_init();
|
||||
|
||||
|
|
@ -613,5 +615,7 @@ ISR(ADC_vect) {
|
|||
AFSK_adc_isr(AFSK_modem, (ADCH - 128));
|
||||
}
|
||||
|
||||
update_led_status();
|
||||
|
||||
++_clock;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue