static BT_ERROR i2c_cleanup(BT_HANDLE hI2C) { const BT_RESOURCE *pResource = BT_GetIntegratedResource(hI2C->pDevice, BT_RESOURCE_IRQ, 0); if(!pResource) { return BT_ERR_GENERIC; } BT_ERROR Error = BT_UnregisterInterrupt(pResource->ulStart, i2c_irq_handler, hI2C); BT_kMutexDestroy(hI2C->pMutex); return Error; }
static BT_ERROR mutex_cleanup(BT_HANDLE hMutex) { BT_kMutexDestroy(hMutex->pMutex); return BT_ERR_NONE; }