Bläddra i källkod

add: add STM32F4x5 STM32F4x7

Dmitry 8 år sedan
förälder
incheckning
7c41ccb06d
3 ändrade filer med 16 tillägg och 5 borttagningar
  1. 4 1
      inc/usb.h
  2. 1 1
      readme.md
  3. 11 3
      src/memmap.inc

+ 4 - 1
inc/usb.h

@@ -70,7 +70,10 @@
     #define usbd_hw usbd_otgfs
     #endif
 
-#elif defined(STM32F429xx)
+#elif defined(STM32F405xx) || defined(STM32F415xx) || \
+      defined(STM32F407xx) || defined(STM32F417xx) || \
+      defined(STM32F427xx) || defined(STM32F437xx) || \
+      defined(STM32F429xx) || defined(STM32F439xx)
 
     #define USBD_STM32F429
 

+ 1 - 1
readme.md

@@ -61,7 +61,7 @@
 
 2. At this moment BULK IN endpoint can use both buffers, but it is not **real** doublebuffered.
 
-3. Tested with STM32L052K8, STM32L100RC, STM32L476RG, STM32F103C8, STM32F103CB, STM32F303CC, STM32F303RE
+3. Tested with STM32L052K8, STM32L100RC, STM32L476RG, STM32F072C8, STM32F103C8, STM32F103CB, STM32F303CC, STM32F303RE
 
 ### Implemented definitions for classes ###
 1. USB HID based on [Device Class Definition for Human Interface Devices (HID) Version 1.11](http://www.usb.org/developers/hidpage/HID1_11.pdf)

+ 11 - 3
src/memmap.inc

@@ -34,9 +34,17 @@
     #define USB_BCDR        0x18
     #define USB_PMABASE     0x40006000
     #define RCC_BASE        0x40021000
-    #define RCC_APB1RSTR    0x28
-    #define RCC_APB1ENR     0x38
-    #define UID_BASE        0x1FF80050
+    #if defined(STM32F042x6) || defined(STM32F048xx) || \
+        defined(STM32F070x6) || defined(STM32F070xB) || \
+        defined(STM32F072xB) || defined(STM32F078xx)
+        #define RCC_APB1RSTR    0x10
+        #define RCC_APB1ENR     0x1C
+        #define UID_BASE        0x1FFFF7AC
+    #else
+        #define RCC_APB1RSTR    0x28
+        #define RCC_APB1ENR     0x38
+        #define UID_BASE        0x1FF80050
+    #endif
 
 #elif defined(STM32L1)
 /* common definitions for STM31L100xx STM32L151xx STM32L152xx STM32L162xx */