建立工程,成功创建两个虚拟串口

This commit is contained in:
ranchuan
2023-06-21 18:00:56 +08:00
commit 3604192d8f
872 changed files with 428764 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
collect (PROJECT_LIB_HEADERS sys.h)
collect (PROJECT_LIB_SOURCES sys.c)
# vim: expandtab:ts=2:sw=2:smartindent

View File

@@ -0,0 +1,74 @@
/*
* Copyright (c) 2018, Linaro Inc. and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* @file generic/template/sys.c
* @brief machine specific system primitives implementation.
*/
#include <metal/io.h>
#include <metal/sys.h>
#include <metal/utilities.h>
#include <stdint.h>
void sys_irq_restore_enable(unsigned int flags)
{
metal_unused(flags);
/* Add implementation here */
}
unsigned int sys_irq_save_disable(void)
{
return 0;
/* Add implementation here */
}
void sys_irq_enable(unsigned int vector)
{
metal_unused(vector);
/* Add implementation here */
}
void sys_irq_disable(unsigned int vector)
{
metal_unused(vector);
/* Add implementation here */
}
void metal_machine_cache_flush(void *addr, unsigned int len)
{
metal_unused(addr);
metal_unused(len);
/* Add implementation here */
}
void metal_machine_cache_invalidate(void *addr, unsigned int len)
{
metal_unused(addr);
metal_unused(len);
/* Add implementation here */
}
void metal_generic_default_poll(void)
{
/* Add implementation here */
}
void *metal_machine_io_mem_map(void *va, metal_phys_addr_t pa,
size_t size, unsigned int flags)
{
metal_unused(pa);
metal_unused(size);
metal_unused(flags);
/* Add implementation here */
return va;
}

View File

@@ -0,0 +1,35 @@
/*
* Copyright (c) 2018, Linaro Inc. and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* @file freertos/template/sys.h
* @brief freertos template system primitives for libmetal.
*/
#ifndef __METAL_FREERTOS_SYS__H__
#error "Include metal/sys.h instead of metal/freertos/@PROJECT_MACHINE@/sys.h"
#endif
#ifndef __METAL_FREERTOS_TEMPLATE_SYS__H__
#define __METAL_FREERTOS_TEMPLATE_SYS__H__
#ifdef __cplusplus
extern "C" {
#endif
#ifdef METAL_INTERNAL
void sys_irq_enable(unsigned int vector);
void sys_irq_disable(unsigned int vector);
#endif /* METAL_INTERNAL */
#ifdef __cplusplus
}
#endif
#endif /* __METAL_FREERTOS_SYS__H__ */