move and add optional tusb_app_virt_to_phys/tusb_app_phys_to_virt

also add place holder for tusb_app_dcache_flush() and
tusb_app_dcache_invalidate()
This commit is contained in:
hathach
2023-02-22 22:14:50 +07:00
parent 4c846af53e
commit 1466afafeb
6 changed files with 38 additions and 12 deletions

View File

@@ -75,6 +75,21 @@
#include "tusb_timeout.h" // TODO remove
//--------------------------------------------------------------------+
// Optional API implemented by application if needed
// TODO move to a more ovious place/file
//--------------------------------------------------------------------+
// flush data cache
TU_ATTR_WEAK extern void tusb_app_dcache_flush(uintptr_t addr, uint32_t data_size);
// invalidate data cache
TU_ATTR_WEAK extern void tusb_app_dcache_invalidate(uintptr_t addr, uint32_t data_size);
// Optional physical <-> virtual address translation
TU_ATTR_WEAK extern void* tusb_app_virt_to_phys(void *virt_addr);
TU_ATTR_WEAK extern void* tusb_app_phys_to_virt(void *phys_addr);
//--------------------------------------------------------------------+
// Internal Inline Functions
//--------------------------------------------------------------------+