/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See the file COPYING * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Copyright (C) 2010 Frank van Maarseveen */ #include #include #include #include "hardware.h" #include "common.h" #include "timer0.h" #include "spm.h" #include "transmit.h" #include "program.h" __attribute__((noreturn)) void main(void) { prog_uint8_t *p, *end; hw_init(); t0_init(); do_sei(); end = program + sizeof (program) - sizeof (program) % sizeof (struct spm); while (1) { for (p = program; p < end; p += sizeof (struct spm)) { tx_packet(p, sizeof (struct spm)); t0_mswait(10); } } }