aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/libmaple.h
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-08-31 22:05:39 -0400
committerbnewbold <bnewbold@robocracy.org>2010-08-31 22:05:39 -0400
commit0ccec95446d4c7f3ea47a46d267c791fb22bb8d4 (patch)
tree0ea524020fc464c33b8f988e3f182e908105e1fc /libmaple/libmaple.h
parent02d7b08f0497096f21e41922e0efb54c4ef33bab (diff)
downloadlibrambutan-0ccec95446d4c7f3ea47a46d267c791fb22bb8d4.tar.gz
librambutan-0ccec95446d4c7f3ea47a46d267c791fb22bb8d4.zip
Portability fixes
Still not working but fixed a lot of merge errors
Diffstat (limited to 'libmaple/libmaple.h')
-rw-r--r--libmaple/libmaple.h33
1 files changed, 13 insertions, 20 deletions
diff --git a/libmaple/libmaple.h b/libmaple/libmaple.h
index 8e072c3..437566f 100644
--- a/libmaple/libmaple.h
+++ b/libmaple/libmaple.h
@@ -34,7 +34,7 @@
#include "libmaple_types.h"
// General configuration
-#define MAPLE_DEBUG 0
+#define MAPLE_DEBUG 1
// MCU-specific configuration
#ifdef MCU_STM32F103RB // eg, LeafLabs Maple
@@ -48,16 +48,21 @@
// Number of timer devices ports, definately used
#define NR_TIMERS 4
+ // Number of USART ports
+ #define NR_USART 3
+
// Has an FSMC bus?
- #define NR_FSMC 1
+ #define NR_FSMC 0
// Has an FSMC bus?
- #define NR_DAC_PINS 2
+ #define NR_DAC_PINS 0
// 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_DISC_BANK GPIOC_BASE
+ #define USB_DISC_PIN 12
#define USB_CONFIG_MAX_POWER (100 >> 1)
#define RESET_DELAY (100)
@@ -86,36 +91,26 @@
#define BITBAND_PERI_BASE 0x42000000
#endif
-#ifdef MCU_STM32F103ZE // eg, LeafLabs Maple Native
-
- // Number of GPIO ports (GPIOA, GPIOB, etc), definately used
+#ifdef MCU_STM32F103ZE
+ // eg, LeafLabs Maple Native
#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 NR_USART 3
#define NR_FSMC 1
-
- // Has an FSMC bus?
#define NR_DAC_PINS 2
- // 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_DISC_BANK GPIOB_BASE
+ #define USB_DISC_PIN 8
#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 GPIOC_BASE
#define ERROR_LED_PIN 15
#define ERROR_USART_NUM 1
@@ -123,12 +118,10 @@
#define ERROR_TX_PIN 10
#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