mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-21 12:23:32 +08:00
ecf2d82159
* Synchronize the code of the rt mart branch to the master branch. * TTY device * Add lwP code from rt-smart * Add vnode in DFS, but DFS will be re-write for rt-smart * There are three libcpu for rt-smart: * arm/cortex-a, arm/aarch64 * riscv64 Co-authored-by: Rbb666 <zhangbingru@rt-thread.com> Co-authored-by: zhkag <zhkag@foxmail.com>
41 lines
906 B
C
41 lines
906 B
C
#ifndef SUNXI_HAL_MEM_H
|
|
#define SUNXI_HAL_MEM_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
#include <stdlib.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
void *hal_malloc(uint32_t size);
|
|
void hal_free(void *p);
|
|
|
|
void *hal_malloc_align(uint32_t size, int align);
|
|
void hal_free_align(void *p);
|
|
|
|
#ifdef CONFIG_KERNEL_FREERTOS
|
|
#ifdef CONFIG_CORE_DSP0
|
|
extern unsigned long __va_to_pa(unsigned long vaddr);
|
|
extern unsigned long __pa_to_va(unsigned long paddr);
|
|
#else
|
|
#define __va_to_pa(vaddr) ((u32)vaddr)
|
|
#define __pa_to_va(vaddr) ((u32)vaddr)
|
|
#endif /* CONFIG_CORE_DSP0 */
|
|
#else
|
|
#include <rtthread.h>
|
|
|
|
unsigned long awos_arch_virt_to_phys(unsigned long virtaddr);
|
|
unsigned long awos_arch_phys_to_virt(unsigned long phyaddr);
|
|
|
|
#define __va_to_pa(vaddr) awos_arch_virt_to_phys((vaddr))
|
|
#define __pa_to_va(paddr) awos_arch_phys_to_virt((paddr))
|
|
#endif /* CONFIG_KERNEL_FREERTOS */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|