1 /* 2 * Copyright (c) 2017-2020 Arm Limited. All rights reserved. 3 * Copyright (c) 2020 Nuvoton Technology Corp. All rights reserved. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /** 19 * \file device_definition.h 20 * \brief The structure definitions in this file are exported based 21 * on the peripheral definitions from device_cfg.h. 22 * This file is meant to be used as a helper for baremetal 23 * applications and/or as an example of how to configure the generic 24 * driver structures. 25 */ 26 27 #ifndef __DEVICE_DEFINITION_H__ 28 #define __DEVICE_DEFINITION_H__ 29 30 #include "device_cfg.h" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* ======= Peripheral configuration structure declarations ======= */ 37 38 /* ARM GPIO driver structures */ 39 #ifdef GPIO0_CMSDK_S 40 #include "gpio_cmsdk_drv.h" 41 extern struct gpio_cmsdk_dev_t GPIO0_CMSDK_DEV_S; 42 #endif 43 44 /* UART CMSDK driver structures */ 45 #ifdef UART0_CMSDK_S 46 #include "uart_cmsdk_drv.h" 47 extern struct uart_cmsdk_dev_t ARM_UART0_DEV_S; 48 #endif 49 #ifdef UART0_CMSDK_NS 50 #include "uart_cmsdk_drv.h" 51 extern struct uart_cmsdk_dev_t ARM_UART0_DEV_NS; 52 #endif 53 54 #ifdef UART1_CMSDK_S 55 #include "uart_cmsdk_drv.h" 56 extern struct uart_cmsdk_dev_t ARM_UART1_DEV_S; 57 #endif 58 #ifdef UART1_CMSDK_NS 59 #include "uart_cmsdk_drv.h" 60 extern struct uart_cmsdk_dev_t ARM_UART1_DEV_NS; 61 #endif 62 63 /* CMSDK Timer driver structures */ 64 #ifdef CMSDK_TIMER0_S 65 #include "timer_cmsdk_drv.h" 66 extern struct timer_cmsdk_dev_t CMSDK_TIMER0_DEV_S; 67 #endif 68 #ifdef CMSDK_TIMER0_NS 69 #include "timer_cmsdk_drv.h" 70 extern struct timer_cmsdk_dev_t CMSDK_TIMER0_DEV_NS; 71 #endif 72 73 #ifdef CMSDK_TIMER1_S 74 #include "timer_cmsdk_drv.h" 75 extern struct timer_cmsdk_dev_t CMSDK_TIMER1_DEV_S; 76 #endif 77 #ifdef CMSDK_TIMER1_NS 78 #include "timer_cmsdk_drv.h" 79 extern struct timer_cmsdk_dev_t CMSDK_TIMER1_DEV_NS; 80 #endif 81 82 #ifdef CMSDK_TIMER2_S 83 #include "timer_cmsdk_drv.h" 84 extern struct timer_cmsdk_dev_t CMSDK_TIMER2_DEV_S; 85 #endif 86 #ifdef CMSDK_TIMER2_NS 87 #include "timer_cmsdk_drv.h" 88 extern struct timer_cmsdk_dev_t CMSDK_TIMER2_DEV_NS; 89 #endif 90 91 92 93 #ifdef __cplusplus 94 } 95 #endif 96 97 #endif /* __DEVICE_DEFINITION_H__ */ 98