mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 09:43:57 -04:00
HAL_Chibios: don't unregister shared DMA
the shared DMA handle is a property of the bus, not the device, so should not be unregistered when the device is removed
This commit is contained in:
parent
9812fc9574
commit
755eca31c2
@ -59,7 +59,6 @@ I2CDevice::I2CDevice(uint8_t bus, uint8_t address) :
|
||||
|
||||
I2CDevice::~I2CDevice()
|
||||
{
|
||||
businfo[_busnum].dma_handle->unregister();
|
||||
printf("I2C device bus %u address 0x%02x closed\n",
|
||||
(unsigned)_busnum, (unsigned)_address);
|
||||
free(pname);
|
||||
|
@ -164,7 +164,6 @@ SPIDevice::~SPIDevice()
|
||||
{
|
||||
//printf("SPI device %s on %u:%u closed\n", device_desc.name,
|
||||
// (unsigned)bus.bus, (unsigned)device_desc.device);
|
||||
bus.dma_handle->unregister();
|
||||
free(pname);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,6 @@ void Shared_DMA::unregister()
|
||||
locks[stream_id2].deallocate();
|
||||
locks[stream_id2].obj = nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// lock the DMA channels
|
||||
|
Loading…
Reference in New Issue
Block a user