1 /*
2  * Copyright (c) 2018, Pinecone Inc. and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*
8  * @file	nuttx/io.h
9  * @brief	NuttX specific io definitions.
10  */
11 
12 #ifndef __METAL_IO__H__
13 #error "Include metal/io.h instead of metal/nuttx/io.h"
14 #endif
15 
16 #ifndef __METAL_NUTTX_IO__H__
17 #define __METAL_NUTTX_IO__H__
18 
19 #include <metal/utilities.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * @brief  Get the default global io ops.
27  * @return  an io ops.
28  */
29 struct metal_io_ops *metal_io_get_ops(void);
30 
31 /**
32  * @brief  Get the default global io region.
33  * @return  an io region.
34  */
35 struct metal_io_region *metal_io_get_region(void);
36 
37 #ifdef METAL_INTERNAL
38 
39 /**
40  * @brief memory mapping for an I/O region
41  */
metal_sys_io_mem_map(struct metal_io_region * io)42 static inline void metal_sys_io_mem_map(struct metal_io_region *io)
43 {
44 	metal_unused(io);
45 }
46 #endif
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* __METAL_NUTTX_IO__H__ */
53