2424#endif
2525#define pin_pha2 0 /* PB0 */
2626#define pin_pha3 1 /* PA1 */
27- #else
27+ #elif TARGET == TARGET_shugart
2828#define pin_dir 0 /* PB0 */
2929#define pin_step 1 /* PA1 */
3030#endif
@@ -62,7 +62,7 @@ DEFINE_IRQ(dma_rdata_irq, "IRQ_rdata_dma");
6262#if TARGET == TARGET_apple2
6363static struct timer step_timer ;
6464static void POLL_step (void * unused );
65- #else
65+ #elif TARGET == TARGET_shugart
6666void IRQ_28 (void ) __attribute__((alias ("IRQ_STEP_changed" ))); /* TMR2 */
6767#endif
6868
@@ -81,7 +81,7 @@ static const struct exti_irq exti_irqs[] = {
8181 /* WDATA */ { 27 , FLOPPY_IRQ_WGATE_PRI , 0 },
8282#endif
8383 /* SELA */ { 6 , FLOPPY_IRQ_SEL_PRI , 0 },
84- #if TARGET == TARGET_floppy
84+ #if TARGET == TARGET_shugart
8585 /* STEP */ { 28 , FLOPPY_IRQ_STEP_PRI , m (2 ) /* dummy */ },
8686#endif
8787 /* WGATE */ { 7 , FLOPPY_IRQ_WGATE_PRI , 0 },
@@ -107,7 +107,7 @@ static volatile uint32_t *p_dma_rd_active;
107107
108108bool_t floppy_ribbon_is_reversed (void )
109109{
110- #if TARGET == TARGET_floppy
110+ #if TARGET == TARGET_shugart
111111 time_t t_start = time_now ();
112112
113113 /* If ribbon is reversed then most/all inputs are grounded.
@@ -140,7 +140,7 @@ static void board_floppy_init(void)
140140 gpio->crl = (gpio->crl & ~(0xfu<<((pin)<<2))) \
141141 | (((mode)&0xfu)<<((pin)<<2))
142142
143- #if TARGET == TARGET_floppy
143+ #if TARGET == TARGET_shugart
144144 gpio_configure_pin (gpioa , pin_step , GPI_bus );
145145#endif
146146 gpio_configure_pin (gpio_data , pin_wdata , GPI_bus );
@@ -153,7 +153,7 @@ static void board_floppy_init(void)
153153 | (((mode)&0x3u)<<((pin)<<1));
154154#define afio syscfg
155155
156- #if TARGET == TARGET_floppy
156+ #if TARGET == TARGET_shugart
157157 gpio_set_af (gpioa , pin_step , 1 );
158158 gpio_configure_pin (gpioa , pin_step , AFI (PUPD_none ));
159159#endif
@@ -189,7 +189,7 @@ static void board_floppy_init(void)
189189 gpio_configure_pin (gpioa , pin_pha3 , GPI_bus );
190190 timer_init (& step_timer , POLL_step , NULL );
191191 timer_set (& step_timer , time_now ());
192- #else
192+ #elif TARGET == TARGET_shugart
193193 gpio_configure_pin (gpiob , pin_dir , GPI_bus );
194194#endif
195195 gpio_configure_pin (gpioa , pin_sel0 , GPI_bus );
@@ -385,7 +385,7 @@ static void POLL_step(void *unused)
385385 timer_set (& step_timer , step_timer .deadline + time_ms (1 ));
386386}
387387
388- #else
388+ #elif TARGET == TARGET_shugart
389389
390390static bool_t drive_is_writing (void )
391391{
0 commit comments