Fix 2.2.2RC1 no gvar compile (#5961)
[opentx.git] / radio / src / targets / sky9x / chip.h
blob40e3f4c569e9c78dda6af5e9874839218fbd2c34
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 //------------------------------------------------------------------------------
22 /// \unit
23 /// !Purpose
24 ///
25 /// Definition of AT91SAM3S4 characteristics and features
26 ///
27 /// !Usage
28 /// -# For ARM core feature, see "AT91SAM3S4 - ARM core features".
29 /// -# For IP features, see "AT91SAM3S4 - IP features".
30 /// -# For misc, see "AT91SAM3S4 - Misc".
31 //------------------------------------------------------------------------------
33 #ifndef _CHIP_H_
34 #define _CHIP_H_
36 //------------------------------------------------------------------------------
37 // Headers
38 //------------------------------------------------------------------------------
40 //------------------------------------------------------------------------------
41 // Definitions
42 //------------------------------------------------------------------------------
44 //------------------------------------------------------------------------------
45 /// \page "AT91SAM3S4 - ARM core features"
46 /// This page lists several characteristics related to the ARM core
47 ///
49 //ARM core features
51 /// ARM core definition.
52 #define cortexm3
54 /// family definition.
55 #define at91sam3s
57 //------------------------------------------------------------------------------
58 /// \page "AT91SAM3S4 - IP features"
59 /// This page lists several characteristics related to the embedded IP
60 ///
62 //IP FEATURES
64 // EFC GPNVM number
65 #define CHIP_EFC_NUM_GPNVMS 3
67 /// Indicates chip has an Enhanced EFC.
68 #define CHIP_FLASH_EEFC
70 // DMA channels number
71 #define CHIP_DMA_CHANNEL_NUM 4
73 // Indicate chip's MCI interface.
74 #define MCI2_INTERFACE
76 // Indicate chip SSC has DMA interface.
77 #define CHIP_SSC_DMA
79 // Indicate chip SPI has DMA interface.
80 #define CHIP_SPI_DMA
82 /// Indicates chip has an UDP Full Speed.
83 #define CHIP_USB_UDP
85 /// Indicates chip has an internal pull-up.
86 #define CHIP_USB_PULLUP_INTERNAL
88 /// Number of USB endpoints
89 #define CHIP_USB_NUMENDPOINTS 8
91 /// Endpoints max paxcket size
92 #define CHIP_USB_ENDPOINTS_MAXPACKETSIZE(i) \
93 ((i == 0) ? 64 : \
94 ((i == 1) ? 64 : \
95 ((i == 2) ? 64 : \
96 ((i == 3) ? 64 : \
97 ((i == 4) ? 512 : \
98 ((i == 5) ? 512 : \
99 ((i == 6) ? 64 : \
100 ((i == 7) ? 64 : 0 ))))))))
102 /// Endpoints Number of Bank
103 #define CHIP_USB_ENDPOINTS_BANKS(i) \
104 ((i == 0) ? 1 : \
105 ((i == 1) ? 2 : \
106 ((i == 2) ? 2 : \
107 ((i == 3) ? 1 : \
108 ((i == 4) ? 2 : \
109 ((i == 5) ? 2 : \
110 ((i == 6) ? 2 : \
111 ((i == 7) ? 2 : 0 ))))))))
113 //------------------------------------------------------------------------------
114 /// \page "AT91SAM3S4 - Misc "
115 /// This page lists misc features
118 //Misc
120 #endif // _CHIP_H_