|
| 1 | +/* |
| 2 | + * Copyright (c) 2016, Devan Lai |
| 3 | + * |
| 4 | + * Permission to use, copy, modify, and/or distribute this software |
| 5 | + * for any purpose with or without fee is hereby granted, provided |
| 6 | + * that the above copyright notice and this permission notice |
| 7 | + * appear in all copies. |
| 8 | + * |
| 9 | + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR |
| 13 | + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 14 | + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
| 15 | + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 16 | + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 17 | + */ |
| 18 | + |
| 19 | +#ifndef CONFIG_H_INCLUDED |
| 20 | +#define CONFIG_H_INCLUDED |
| 21 | + |
| 22 | +#ifndef APP_BASE_ADDRESS |
| 23 | +#define APP_BASE_ADDRESS (0x08000000 + BOOTLOADER_OFFSET) |
| 24 | +#endif |
| 25 | +#ifndef FLASH_SIZE_OVERRIDE |
| 26 | +#define FLASH_SIZE_OVERRIDE 0x20000 |
| 27 | +#endif |
| 28 | +#ifndef FLASH_PAGE_SIZE |
| 29 | +#define FLASH_PAGE_SIZE 2048 |
| 30 | +#endif |
| 31 | +#ifndef DFU_UPLOAD_AVAILABLE |
| 32 | +#define DFU_UPLOAD_AVAILABLE 1 |
| 33 | +#endif |
| 34 | +#ifndef DFU_DOWNLOAD_AVAILABLE |
| 35 | +#define DFU_DOWNLOAD_AVAILABLE 1 |
| 36 | +#endif |
| 37 | + |
| 38 | +#ifndef HAVE_LED |
| 39 | +#define HAVE_LED 1 |
| 40 | +#endif |
| 41 | +#ifndef LED_OPEN_DRAIN |
| 42 | +#define LED_OPEN_DRAIN 0 |
| 43 | +#endif |
| 44 | +#ifndef LED_GPIO_PORT |
| 45 | +#define LED_GPIO_PORT GPIOB |
| 46 | +#endif |
| 47 | +#ifndef LED_GPIO_PIN |
| 48 | +#define LED_GPIO_PIN GPIO2 |
| 49 | +#endif |
| 50 | + |
| 51 | +#ifndef HAVE_BUTTON |
| 52 | +#define HAVE_BUTTON 1 |
| 53 | +#endif |
| 54 | +#ifndef BUTTON_ACTIVE_HIGH |
| 55 | +#define BUTTON_ACTIVE_HIGH 1 |
| 56 | +#endif |
| 57 | +#ifndef BUTTON_GPIO_PORT |
| 58 | +#define BUTTON_GPIO_PORT GPIOA |
| 59 | +#endif |
| 60 | +#ifndef BUTTON_GPIO_PIN |
| 61 | +#define BUTTON_GPIO_PIN GPIO0 |
| 62 | +#endif |
| 63 | +#ifndef BUTTON_USES_PULL |
| 64 | +#define BUTTON_USES_PULL 1 |
| 65 | +#endif |
| 66 | +#ifndef BUTTON_SAMPLE_DELAY_CYCLES |
| 67 | +#define BUTTON_SAMPLE_DELAY_CYCLES 1440000 |
| 68 | +#endif |
| 69 | + |
| 70 | +#ifndef HAVE_USB_PULLUP_CONTROL |
| 71 | +#define HAVE_USB_PULLUP_CONTROL 0 |
| 72 | +#endif |
| 73 | + |
| 74 | +#ifndef USES_GPIOA |
| 75 | +#define USES_GPIOA 1 |
| 76 | +#endif |
| 77 | +#ifndef USES_GPIOB |
| 78 | +#define USES_GPIOB 1 |
| 79 | +#endif |
| 80 | + |
| 81 | +#endif |
0 commit comments