Przeglądaj źródła

New board: F1 Plus (Unbuffered)

Keir Fraser 3 lat temu
rodzic
commit
b5a02294ce

+ 1 - 0
inc/mcu/stm32/f1.h

@@ -66,6 +66,7 @@ static SER_ID ser_id = (uint32_t *)0x1ffff7e8;
 enum {
     F1SM_basic = 0,
     F1SM_plus,
+    F1SM_plus_unbuffered,
 };
 
 struct board_config {

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

@@ -16,7 +16,8 @@ from greaseweazle import usb as USB
 from greaseweazle import version
 
 model_id = { 1: { 0: 'F1',
-                  1: 'F1 Plus' },
+                  1: 'F1 Plus',
+                  2: 'F1 Plus (Unbuffered)' },
              4: { 0: 'V4' },
              7: { 0: 'F7 v1',
                   1: 'F7 Plus (Ant Goffart, v1)',

+ 10 - 0
src/mcu/stm32f1/board.c

@@ -34,6 +34,11 @@ const static struct pin_mapping _user_pins_f1_plus[] = {
     { 4, _A,  3, _PP },
     { 6, _A,  1, _PP },
     { 0,  0,  0, _PP } };
+const static struct pin_mapping _user_pins_f1_plus_unbuffered[] = {
+    { 2, _B,  9, _OD },
+    { 4, _A,  3, _OD },
+    { 6, _A,  1, _OD },
+    { 0,  0,  0, _OD } };
 
 const static struct board_config _board_config[] = {
     [F1SM_basic] = {
@@ -43,6 +48,10 @@ const static struct board_config _board_config[] = {
     [F1SM_plus] = {
         .flippy    = TRUE,
         .user_pins = _user_pins_f1_plus,
+        .msel_pins = _msel_pins_f1_plus },
+    [F1SM_plus_unbuffered] = {
+        .flippy    = TRUE,
+        .user_pins = _user_pins_f1_plus_unbuffered,
         .msel_pins = _msel_pins_f1_plus }
 };
 
@@ -130,6 +139,7 @@ static void mcu_board_init(void)
 
     switch (gw_info.hw_submodel) {
     case F1SM_plus:
+    case F1SM_plus_unbuffered:
         /* /RDY input line is externally pulled up. */
         pu[_A] &= ~(1u << 8); /* PA8 */
         break;

+ 2 - 0
src/mcu/stm32f1/floppy.c

@@ -78,6 +78,7 @@ static void floppy_mcu_init(void)
         GPI_bus = (get_index() == LOW) ? GPI_pull_up : GPI_floating;
         break;
     case F1SM_plus:
+    case F1SM_plus_unbuffered:
         GPI_bus = GPI_floating;
         break;
     }
@@ -174,6 +175,7 @@ static uint8_t mcu_get_floppy_pin(unsigned int pin, uint8_t *p_level)
 {
     switch (gw_info.hw_submodel) {
     case F1SM_plus:
+    case F1SM_plus_unbuffered:
         if (pin == 34) {
             *p_level = gpio_read_pin(gpioa, 8);
             return ACK_OKAY;