diff options
Diffstat (limited to 'libmaple/libmaple.h')
-rw-r--r-- | libmaple/libmaple.h | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/libmaple/libmaple.h b/libmaple/libmaple.h index 1fd0785..a481e63 100644 --- a/libmaple/libmaple.h +++ b/libmaple/libmaple.h @@ -48,9 +48,6 @@ // Number of timer devices ports, definately used #define NR_TIMERS 4 - // Number of ADC pins. Not actually used? - #define NR_ANALOG_PINS 29 - // Has an FSMC bus? //#define HAS_FSMC // Maple does not @@ -86,6 +83,52 @@ #define BITBAND_PERI_BASE 0x42000000 #endif +#ifdef MCU_STM32F103ZE // eg, LeafLabs Maple Native + + // Number of GPIO ports (GPIOA, GPIOB, etc), definately used + #define NR_GPIO_PORTS 7 + + // Total number of GPIO pins + #define NR_GPIO_PINS 63 + + // Number of timer devices ports, definately used + #define NR_TIMERS 8 + + // Has an FSMC bus? + #define HAS_FSMC + + // USB Identifier numbers + // Descriptor strings must be modified by hand in usb/descriptors.c for now + #define VCOM_ID_VENDOR 0x1EAF + #define VCOM_ID_PRODUCT 0x0004 + #define USB_CONFIG_MAX_POWER (100 >> 1) + #define RESET_DELAY (100) + + // Where to put usercode (based on space reserved for bootloader) + #define USER_ADDR_ROM 0x08005000 + #define USER_ADDR_RAM 0x20000C00 + #define STACK_TOP 0x20000800 + + // Debug port settings (from ASSERT) + #define ERROR_LED_PORT GPIOA_BASE + #define ERROR_LED_PIN 5 + #define ERROR_USART_NUM 2 + #define ERROR_USART_BAUD 9600 + #define ERROR_TX_PIN 2 + #define ERROR_TX_PORT GPIOA_BASE + + // Just in case, most boards have at least some memory + #ifndef RAMSIZE + # define RAMSIZE (caddr_t)0x50000 + #endif + + // Bitbanded Memory sections + #define BITBAND_SRAM_REF 0x20000000 + #define BITBAND_SRAM_BASE 0x22000000 + #define BITBAND_PERI_REF 0x40000000 + #define BITBAND_PERI_BASE 0x42000000 +#endif + // Make sure MCU-specific settings were defined #ifndef NR_GPIO_PORTS #error Error: No MCU type specified. Add something like -DMCU_STM32F103RB \ |