24
24
#endif
25
25
#define pin_pha2 0 /* PB0 */
26
26
#define pin_pha3 1 /* PA1 */
27
- #else
27
+ #elif TARGET == TARGET_shugart
28
28
#define pin_dir 0 /* PB0 */
29
29
#define pin_step 1 /* PA1 */
30
30
#endif
@@ -62,7 +62,7 @@ DEFINE_IRQ(dma_rdata_irq, "IRQ_rdata_dma");
62
62
#if TARGET == TARGET_apple2
63
63
static struct timer step_timer ;
64
64
static void POLL_step (void * unused );
65
- #else
65
+ #elif TARGET == TARGET_shugart
66
66
void IRQ_28 (void ) __attribute__((alias ("IRQ_STEP_changed" ))); /* TMR2 */
67
67
#endif
68
68
@@ -81,7 +81,7 @@ static const struct exti_irq exti_irqs[] = {
81
81
/* WDATA */ { 27 , FLOPPY_IRQ_WGATE_PRI , 0 },
82
82
#endif
83
83
/* SELA */ { 6 , FLOPPY_IRQ_SEL_PRI , 0 },
84
- #if TARGET == TARGET_floppy
84
+ #if TARGET == TARGET_shugart
85
85
/* STEP */ { 28 , FLOPPY_IRQ_STEP_PRI , m (2 ) /* dummy */ },
86
86
#endif
87
87
/* WGATE */ { 7 , FLOPPY_IRQ_WGATE_PRI , 0 },
@@ -107,7 +107,7 @@ static volatile uint32_t *p_dma_rd_active;
107
107
108
108
bool_t floppy_ribbon_is_reversed (void )
109
109
{
110
- #if TARGET == TARGET_floppy
110
+ #if TARGET == TARGET_shugart
111
111
time_t t_start = time_now ();
112
112
113
113
/* If ribbon is reversed then most/all inputs are grounded.
@@ -140,7 +140,7 @@ static void board_floppy_init(void)
140
140
gpio->crl = (gpio->crl & ~(0xfu<<((pin)<<2))) \
141
141
| (((mode)&0xfu)<<((pin)<<2))
142
142
143
- #if TARGET == TARGET_floppy
143
+ #if TARGET == TARGET_shugart
144
144
gpio_configure_pin (gpioa , pin_step , GPI_bus );
145
145
#endif
146
146
gpio_configure_pin (gpio_data , pin_wdata , GPI_bus );
@@ -153,7 +153,7 @@ static void board_floppy_init(void)
153
153
| (((mode)&0x3u)<<((pin)<<1));
154
154
#define afio syscfg
155
155
156
- #if TARGET == TARGET_floppy
156
+ #if TARGET == TARGET_shugart
157
157
gpio_set_af (gpioa , pin_step , 1 );
158
158
gpio_configure_pin (gpioa , pin_step , AFI (PUPD_none ));
159
159
#endif
@@ -189,7 +189,7 @@ static void board_floppy_init(void)
189
189
gpio_configure_pin (gpioa , pin_pha3 , GPI_bus );
190
190
timer_init (& step_timer , POLL_step , NULL );
191
191
timer_set (& step_timer , time_now ());
192
- #else
192
+ #elif TARGET == TARGET_shugart
193
193
gpio_configure_pin (gpiob , pin_dir , GPI_bus );
194
194
#endif
195
195
gpio_configure_pin (gpioa , pin_sel0 , GPI_bus );
@@ -385,7 +385,7 @@ static void POLL_step(void *unused)
385
385
timer_set (& step_timer , step_timer .deadline + time_ms (1 ));
386
386
}
387
387
388
- #else
388
+ #elif TARGET == TARGET_shugart
389
389
390
390
static bool_t drive_is_writing (void )
391
391
{
0 commit comments