Browse Source

f7: Support new submodel: F7 Plus (Ant Goffart, version 2)

Keir Fraser 4 years ago
parent
commit
b2939f5766
3 changed files with 17 additions and 6 deletions
  1. 2 1
      inc/stm32/f7.h
  2. 3 2
      scripts/greaseweazle/tools/info.py
  3. 12 3
      src/f7/board.c

+ 2 - 1
inc/stm32/f7.h

@@ -90,9 +90,10 @@ void gpio_set_af(GPIO gpio, unsigned int pin, unsigned int af);
 
 enum {
     F7SM_basic_v1 = 0,
-    F7SM_ambertronic_f7_plus,
+    F7SM_ant_goffart_f7_plus_v1,
     F7SM_lightning,
     F7SM_basic_v2,
+    F7SM_ant_goffart_f7_plus_v2,
 };
 
 struct user_pin {

+ 3 - 2
scripts/greaseweazle/tools/info.py

@@ -17,9 +17,10 @@ from greaseweazle import version
 
 model_id = { 1: { 0: 'F1' },
              7: { 0: 'F7 (version 1)',
-                  1: 'AmberTronic F7 Plus',
+                  1: 'F7 Plus (Ant Goffart, version 1)',
                   2: 'F7 Lightning',
-                  3: 'F7 (version 2)' } }
+                  3: 'F7 (version 2)',
+                  4: 'F7 Plus (Ant Goffart, version 2)' } }
 
 speed_id = { 0: 'Full Speed (12 Mbit/s)',
              1: 'High Speed (480 Mbit/s)' }

+ 12 - 3
src/f7/board.c

@@ -35,7 +35,7 @@ GPIO gpio_from_id(uint8_t id)
 const static struct user_pin _user_pins_F7SM_basic_v1[] = {
     { 2, _B, 12, _OD },
     { 0,  0,  0, _OD } };
-const static struct user_pin _user_pins_F7SM_ambertronic_f7_plus[] = {
+const static struct user_pin _user_pins_F7SM_ant_goffart_f7_plus_v1[] = {
     { 2, _B, 12, _OD }, /* board bug: B12 isn't buffered */
     { 4, _C,  6, _PP },
     { 0,  0,  0, _PP } };
@@ -49,15 +49,20 @@ const static struct user_pin _user_pins_F7SM_basic_v2[] = {
     { 4, _C,  8, _OD },
     { 6, _C,  7, _OD },
     { 0,  0,  0, _OD } };
+const static struct user_pin _user_pins_F7SM_ant_goffart_f7_plus_v2[] = {
+    { 2, _B, 12, _PP },
+    { 4, _C,  8, _PP },
+    { 6, _C,  7, _PP },
+    { 0,  0,  0, _PP } };
 const static struct board_config _board_config[] = {
     [F7SM_basic_v1] = {
         .hse_mhz   = 8,
         .hs_usb    = FALSE,
         .user_pins = _user_pins_F7SM_basic_v1 },
-    [F7SM_ambertronic_f7_plus] = {
+    [F7SM_ant_goffart_f7_plus_v1] = {
         .hse_mhz   = 8,
         .hs_usb    = FALSE,
-        .user_pins = _user_pins_F7SM_ambertronic_f7_plus },
+        .user_pins = _user_pins_F7SM_ant_goffart_f7_plus_v1 },
     [F7SM_lightning] = {
         .hse_mhz   = 16,
         .hs_usb    = TRUE,
@@ -66,6 +71,10 @@ const static struct board_config _board_config[] = {
         .hse_mhz   = 8,
         .hs_usb    = FALSE,
         .user_pins = _user_pins_F7SM_basic_v2 },
+    [F7SM_ant_goffart_f7_plus_v2] = {
+        .hse_mhz   = 8,
+        .hs_usb    = FALSE,
+        .user_pins = _user_pins_F7SM_ant_goffart_f7_plus_v2 },
 };
 const struct board_config *board_config;