HAL_PX4: fixed FMUv1 build

This commit is contained in:
Andrew Tridgell 2016-11-27 07:45:54 +11:00
parent 619cdbe065
commit f3d401abb9
1 changed files with 8 additions and 0 deletions

View File

@ -236,11 +236,19 @@ extern "C" {
*/
void *PX4Util::dma_allocate(size_t size)
{
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
return fat_dma_alloc(size);
#else
return malloc(size);
#endif
}
void PX4Util::dma_free(void *ptr, size_t size)
{
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
fat_dma_free(ptr, size);
#else
return free(ptr);
#endif
}
#endif // CONFIG_HAL_BOARD == HAL_BOARD_PX4