AP_HAL: added dma allocation routines to hal.util

This commit is contained in:
Andrew Tridgell 2016-11-23 20:30:32 +11:00
parent 28daddaaf2
commit e42bb20052

View File

@ -111,6 +111,10 @@ public:
// create a new semaphore
virtual Semaphore *new_semaphore(void) { return nullptr; }
// allocate and free DMA-capable memory if possible. Otherwise return normal memory
virtual void *dma_allocate(size_t size) { return malloc(size); }
virtual void dma_free(void *ptr, size_t size) { return free(ptr); }
protected:
// we start soft_armed false, so that actuators don't send any
// values until the vehicle code has fully started