Frees a PCI device ID on the bus. - `id`: ID to free on the bus. ## Errors Returns [`PciRootError::InvalidPciDeviceSlot`] if the slot exceeds [`NUM_DEVICE_IDS`].
(&mut self, id: u8)
| 251 | /// * Returns [`PciRootError::InvalidPciDeviceSlot`] if the slot |
| 252 | /// exceeds [`NUM_DEVICE_IDS`]. |
| 253 | pub fn free_device_id(&mut self, id: u8) -> Result<()> { |
| 254 | if id < NUM_DEVICE_IDS { |
| 255 | self.device_ids[id as usize] = DeviceIdState::Free; |
| 256 | Ok(()) |
| 257 | } else { |
| 258 | Err(PciRootError::InvalidPciDeviceSlot(id as usize)) |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | pub struct PciConfigIo { |