@@ -154,11 +154,11 @@ unsafe fn set_xfb(addr: u32, xfb: &Xfb, bottom: bool) {
154
154
}
155
155
156
156
unsafe fn set_top_xfb ( xfb : & Xfb ) {
157
- set_xfb ( BASE + 0x1c , xfb, false ) ;
157
+ unsafe { set_xfb ( BASE + 0x1c , xfb, false ) } ;
158
158
}
159
159
160
160
unsafe fn set_bottom_xfb ( xfb : & Xfb ) {
161
- set_xfb ( BASE + 0x24 , xfb, true ) ;
161
+ unsafe { set_xfb ( BASE + 0x24 , xfb, true ) } ;
162
162
}
163
163
164
164
/*
@@ -219,21 +219,23 @@ unsafe fn set_border() {
219
219
}
220
220
221
221
unsafe fn setup_interlaced ( width : usize , height : usize , xfb : & Xfb ) {
222
- set_vertical_timing ( height as u16 , 6 ) ;
223
- configure ( ConfigureFlags :: PAL | ConfigureFlags :: INTERLACED | ConfigureFlags :: ENABLE ) ;
224
- // TODO: figure out why 0x40 becomes 0x42 once read here…
225
- set_horizontal_timing ( 71 , 105 , 429 , 373 , 162 , 64 ) ;
226
- set_field_vertical_timing ( 3 , 24 , 2 , 25 ) ;
227
- set_burst_blanking_interval_1 ( 520 , 12 , 520 , 12 ) ;
228
- set_burst_blanking_interval_2 ( 519 , 13 , 519 , 13 ) ;
229
- set_top_xfb ( xfb) ;
230
- set_bottom_xfb ( xfb) ;
231
- set_display_interrupts ( ) ;
232
- // 0x40 and 0x44 are display latch registers, unused?
233
- set_scaled_width ( width as u16 ) ;
234
- set_aa_filters ( ) ;
235
- set_clock ( 27 /* MHz */ ) ;
236
- set_border ( ) ;
222
+ unsafe {
223
+ set_vertical_timing ( height as u16 , 6 ) ;
224
+ configure ( ConfigureFlags :: PAL | ConfigureFlags :: INTERLACED | ConfigureFlags :: ENABLE ) ;
225
+ // TODO: figure out why 0x40 becomes 0x42 once read here…
226
+ set_horizontal_timing ( 71 , 105 , 429 , 373 , 162 , 64 ) ;
227
+ set_field_vertical_timing ( 3 , 24 , 2 , 25 ) ;
228
+ set_burst_blanking_interval_1 ( 520 , 12 , 520 , 12 ) ;
229
+ set_burst_blanking_interval_2 ( 519 , 13 , 519 , 13 ) ;
230
+ set_top_xfb ( xfb) ;
231
+ set_bottom_xfb ( xfb) ;
232
+ set_display_interrupts ( ) ;
233
+ // 0x40 and 0x44 are display latch registers, unused?
234
+ set_scaled_width ( width as u16 ) ;
235
+ set_aa_filters ( ) ;
236
+ set_clock ( 27 /* MHz */ ) ;
237
+ set_border ( ) ;
238
+ }
237
239
}
238
240
239
241
/// A struct representing the Video Interface, or VI. This is the piece of hardware which scans
0 commit comments