@@ -167,7 +167,6 @@ struct Pins {
167167 i2s_dac_data : Pin < bank0:: Gpio26 , Function < pac:: PIO1 > > ,
168168 i2s_bit_clock : Pin < bank0:: Gpio27 , Function < pac:: PIO1 > > ,
169169 i2s_lr_clock : Pin < bank0:: Gpio28 , Function < pac:: PIO1 > > ,
170- pico_led : Pin < bank0:: Gpio25 , Output < PushPull > > ,
171170}
172171
173172// -----------------------------------------------------------------------------
@@ -468,6 +467,11 @@ impl Hardware {
468467 delay : cortex_m:: delay:: Delay ,
469468 ) -> ( Hardware , IrqPin ) {
470469 let hal_pins = rp_pico:: Pins :: new ( bank, pads, sio, resets) ;
470+ // We construct the pin here and then throw it away. Then Core 1 does
471+ // some unsafe writes to the GPIO_SET/GPIO_CLEAR registers to set/clear
472+ // pin 25 to track render loop timing. This avoids trying to 'move' the pin
473+ // over to Core 1.
474+ let _pico_led = hal_pins. led . into_push_pull_output ( ) ;
471475
472476 (
473477 Hardware {
@@ -607,7 +611,6 @@ impl Hardware {
607611 i2s_dac_data : hal_pins. gpio26 . into_mode ( ) ,
608612 i2s_bit_clock : hal_pins. gpio27 . into_mode ( ) ,
609613 i2s_lr_clock : hal_pins. gpio28 . into_mode ( ) ,
610- pico_led : hal_pins. led . into_mode ( ) ,
611614 } ,
612615
613616 // We are in SPI MODE 0. This means we change the COPI pin on the
@@ -1183,10 +1186,7 @@ pub extern "C" fn configuration_set(_buffer: common::ApiByteSlice) -> common::Re
11831186
11841187/// Does this Neotron BIOS support this video mode?
11851188pub extern "C" fn video_is_valid_mode ( mode : common:: video:: Mode ) -> bool {
1186- mode == common:: video:: Mode :: new (
1187- common:: video:: Timing :: T640x480 ,
1188- common:: video:: Format :: Text8x16 ,
1189- )
1189+ vga:: test_video_mode ( mode)
11901190}
11911191
11921192/// Switch to a new video mode.
@@ -1643,16 +1643,6 @@ extern "C" fn time_ticks_per_second() -> common::Ticks {
16431643 common:: Ticks ( 1000 )
16441644}
16451645
1646- /// Called when DMA raises IRQ0; i.e. when a DMA transfer to the pixel FIFO or
1647- /// the timing FIFO has completed.
1648- #[ interrupt]
1649- #[ link_section = ".data" ]
1650- fn DMA_IRQ_0 ( ) {
1651- unsafe {
1652- vga:: irq ( ) ;
1653- }
1654- }
1655-
16561646static IRQ_PIN : Mutex < RefCell < Option < IrqPin > > > = Mutex :: new ( RefCell :: new ( None ) ) ;
16571647
16581648/// Called when we get a SIO interrupt on the main bank of GPIO pins.
0 commit comments