PRIVATE int get_started(sub_dev_t *sub_dev_ptr) { u32_t i;char c; /* enable interrupt messages from MINIX */ if ((i=sys_irqenable(&irq_hook_id)) != OK) { error("%s: Couldn't enable IRQs",drv.DriverName); return EIO; } /* let the lower part of the driver start the device */ if (drv_start(sub_dev_ptr->Nr, sub_dev_ptr->DmaMode) != OK) { error("%s: Could not start device %d\n", drv.DriverName, sub_dev_ptr->Nr); } sub_dev_ptr->DmaBusy = TRUE; /* Dma is busy from now on */ sub_dev_ptr->DmaReadNext = 0; return OK; }
static int ieee802154_resume(struct wpan_phy *wpan_phy) { struct ieee802154_local *local = wpan_phy_priv(wpan_phy); int ret; /* nothing to do if HW shouldn't run */ if (!local->open_count) goto wake_up; /* restart hardware */ ret = drv_start(local); if (ret) return ret; wake_up: ieee802154_wake_queue(&local->hw); local->suspended = false; return 0; }