Root/atusb-sil/fw/common/config.h

1/*
2 * common/config.h - Configuration data for boot loader and application
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 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#ifndef CONFIG_H
14#define CONFIG_H
15
16#include "io.h"
17#include "io-parts.h"
18#include "atusb/usb-ids.h"
19
20
21/* ----- Boot loader configuration ----------------------------------------- */
22
23/*
24 * Make LED output push-pull so that we can output a high voltage.
25 * This turns on the LED, to indicate that we're in the boot loader.
26 */
27
28#define PLATFORM_ENTER \
29    LED_MODE |= 1 << LED_BIT;
30
31
32/*
33 * Turn off the LED when we exit the boot loader.
34 */
35
36#define PLATFORM_EXIT \
37    LED = 0
38
39
40/* ----- Application configuration ----------------------------------------- */
41
42#if defined(BOARD_100813)
43#define HW_TYPE HW_TYPE_100813
44#elif defined(BOARD_101216)
45#define HW_TYPE HW_TYPE_101216
46#else
47#error must define BOARD_100813 or BOARD_101216
48#endif
49
50#endif /* !CONFIG_H */
51

Archive Download this file



interactive