建立工程,成功创建两个虚拟串口
This commit is contained in:
43
source/OpenAMP/libmetal/lib/system/generic/zynq7/sys.h
Normal file
43
source/OpenAMP/libmetal/lib/system/generic/zynq7/sys.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file generic/zynq7/sys.h
|
||||
* @brief generic zynq7 system primitives for libmetal.
|
||||
*/
|
||||
|
||||
#ifndef __METAL_GENERIC_SYS__H__
|
||||
#error "Include metal/sys.h instead of metal/generic/@PROJECT_MACHINE@/sys.h"
|
||||
#endif
|
||||
|
||||
#include "xscugic.h"
|
||||
|
||||
#ifndef __METAL_GENERIC_ZYNQ7_SYS__H__
|
||||
#define __METAL_GENERIC_ZYNQ7_SYS__H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef METAL_INTERNAL
|
||||
|
||||
static inline void sys_irq_enable(unsigned int vector)
|
||||
{
|
||||
XScuGic_EnableIntr(XPAR_SCUGIC_0_DIST_BASEADDR, vector);
|
||||
}
|
||||
|
||||
static inline void sys_irq_disable(unsigned int vector)
|
||||
{
|
||||
XScuGic_DisableIntr(XPAR_SCUGIC_0_DIST_BASEADDR, vector);
|
||||
}
|
||||
|
||||
#endif /* METAL_INTERNAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __METAL_GENERIC_ZYNQ7_SYS__H__ */
|
||||
Reference in New Issue
Block a user