Root/atusb/fw/atusb.c

Source at commit 0db361d49da04eef1f4dd77996450d54e900e083 created 9 years 2 months ago.
By Werner Almesberger, atusb/fw/Makefile (dfu): pass transfer size to hide DFU non-compliance
1/*
2 * fw/atusb.c - ATUSB initialization and main loop
3 *
4 * Written 2008-2011 by Werner Almesberger
5 * Copyright 2008-2011 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#include <stdint.h>
15
16#include <avr/io.h>
17
18#include "usb.h"
19
20#include "board.h"
21#include "spi.h"
22#include "atusb/ep0.h"
23
24
25int main(void)
26{
27    board_init();
28    spi_init();
29    reset_rf();
30
31    /* now we should be at 8 MHz */
32
33    usb_init();
34    ep0_init();
35
36    while (1)
37        usb_poll();
38}
39

Archive Download this file



interactive