File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ static struct unit {
4343 bool_t initialised ;
4444 bool_t is_flippy ;
4545 bool_t motor ;
46- } unit [3 ];
46+ } unit [4 ];
4747
4848static struct gw_delay delay_params ;
4949static const struct gw_delay factory_delay_params = {
@@ -197,6 +197,7 @@ static void drive_deselect(void)
197197 case 0 : pin = 10 ; break ;
198198 case 1 : pin = 12 ; break ;
199199 case 2 : pin = 14 ; break ;
200+ case 3 : pin = 6 ; break ;
200201 }
201202 break ;
202203 }
@@ -230,6 +231,7 @@ static uint8_t drive_select(uint8_t nr)
230231 case 0 : pin = 10 ; break ;
231232 case 1 : pin = 12 ; break ;
232233 case 2 : pin = 14 ; break ;
234+ case 3 : pin = 6 ; break ;
233235 default : return ACK_BAD_UNIT ;
234236 }
235237 break ;
@@ -264,7 +266,7 @@ static uint8_t drive_motor(uint8_t nr, bool_t on)
264266 }
265267 break ;
266268 case BUS_SHUGART :
267- if (nr >= 3 )
269+ if (nr >= 4 )
268270 return ACK_BAD_UNIT ;
269271 /* All shugart units share one motor line. Alias them all to unit 0. */
270272 nr = 0 ;
@@ -305,7 +307,7 @@ static uint8_t drive_get_info(int nr, struct gw_drive_info *d)
305307 return ACK_BAD_UNIT ;
306308 break ;
307309 case BUS_SHUGART :
308- if (nr >= 3 )
310+ if (nr >= 4 )
309311 return ACK_BAD_UNIT ;
310312 break ;
311313 default :
You can’t perform that action at this time.
0 commit comments