LED driver implemented

This commit is contained in:
Mark Qvist 2019-01-12 16:30:26 +01:00
parent fa1d89d0e3
commit 6258e1e62e
7 changed files with 53 additions and 49 deletions

View file

@ -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;
}