LED driver work

This commit is contained in:
Mark Qvist 2019-01-12 15:12:51 +01:00
parent c22123b953
commit 372264d379
12 changed files with 162 additions and 29 deletions

12
main.c
View file

@ -5,6 +5,7 @@
#include "hardware/VREF.h"
#include "hardware/AFSK.h"
#include "hardware/Serial.h"
#include "hardware/LED.h"
#include "protocol/AX25.h"
#include "protocol/KISS.h"
#include "util/time.h"
@ -18,19 +19,25 @@ static void ax25_callback(struct AX25Ctx *ctx) {
kiss_messageCallback(ctx);
}
void system_check(void) {
// TODO: Implement this
LED_STATUS_ON();
}
void init(void) {
sei();
// TODO: serial init was last before
serial_init(&serial);
stdout = &serial.uart0;
stdin = &serial.uart0;
VREF_init();
LED_init();
AFSK_init(&modem);
ax25_init(&AX25, &modem, &modem.fd, ax25_callback);
kiss_init(&AX25, &modem, &serial);
system_check();
}
int main (void) {
@ -40,6 +47,7 @@ int main (void) {
ax25_poll(&AX25);
kiss_poll();
kiss_csma();
led_status();
}
return(0);