File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -2383,8 +2383,34 @@ extern "C" fn bus_select(_periperal_id: FfiOption<u8>) {
23832383 // Do nothing
23842384}
23852385
2386- extern "C" fn bus_get_info ( _periperal_id : u8 ) -> FfiOption < common:: bus:: PeripheralInfo > {
2387- FfiOption :: None
2386+ extern "C" fn bus_get_info ( periperal_id : u8 ) -> FfiOption < common:: bus:: PeripheralInfo > {
2387+ match periperal_id {
2388+ 0 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2389+ name : "BMC" . into ( ) ,
2390+ kind : common:: bus:: PeripheralKind :: Reserved ,
2391+ } ) ,
2392+ 1 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2393+ name : "SdCard" . into ( ) ,
2394+ kind : common:: bus:: PeripheralKind :: SdCard ,
2395+ } ) ,
2396+ 2 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2397+ name : "Slot2" . into ( ) ,
2398+ kind : common:: bus:: PeripheralKind :: Slot ,
2399+ } ) ,
2400+ 3 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2401+ name : "Slot3" . into ( ) ,
2402+ kind : common:: bus:: PeripheralKind :: Slot ,
2403+ } ) ,
2404+ 4 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2405+ name : "Slot4" . into ( ) ,
2406+ kind : common:: bus:: PeripheralKind :: Slot ,
2407+ } ) ,
2408+ 5 => FfiOption :: Some ( common:: bus:: PeripheralInfo {
2409+ name : "Slot5" . into ( ) ,
2410+ kind : common:: bus:: PeripheralKind :: Slot ,
2411+ } ) ,
2412+ _ => FfiOption :: None ,
2413+ }
23882414}
23892415
23902416extern "C" fn bus_write_read (
You can’t perform that action at this time.
0 commit comments