Revision 8543d0d9
modules/RT-STM32L476RG-NUCLEO64/.cproject | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 |
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> |
|
3 |
<storageModule moduleId="org.eclipse.cdt.core.settings"> |
|
4 |
<cconfiguration id="0.603687198"> |
|
5 |
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.603687198" moduleId="org.eclipse.cdt.core.settings" name="Default"> |
|
6 |
<externalSettings/> |
|
7 |
<extensions> |
|
8 |
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
|
9 |
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
|
10 |
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> |
|
11 |
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
|
12 |
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
|
13 |
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
|
14 |
</extensions> |
|
15 |
</storageModule> |
|
16 |
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
|
17 |
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.603687198" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> |
|
18 |
<folderInfo id="0.603687198." name="/" resourcePath=""> |
|
19 |
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.586709963" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> |
|
20 |
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.586709963.1446538340" name=""/> |
|
21 |
<builder autoBuildTarget="all" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.1490952991" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> |
|
22 |
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1134067298" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> |
|
23 |
<tool id="org.eclipse.cdt.build.core.settings.holder.1927705259" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> |
|
24 |
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1013764026" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
|
25 |
</tool> |
|
26 |
<tool id="org.eclipse.cdt.build.core.settings.holder.1367371861" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> |
|
27 |
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1824820452" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
|
28 |
</tool> |
|
29 |
<tool id="org.eclipse.cdt.build.core.settings.holder.1584496456" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> |
|
30 |
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1781547795" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
|
31 |
</tool> |
|
32 |
</toolChain> |
|
33 |
</folderInfo> |
|
34 |
</configuration> |
|
35 |
</storageModule> |
|
36 |
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> |
|
37 |
</cconfiguration> |
|
38 |
</storageModule> |
|
39 |
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
|
40 |
<project id="RT-STM32L476RG-NUCLEO.null.1004513353" name="RT-STM32L476RG-NUCLEO"/> |
|
41 |
</storageModule> |
|
42 |
<storageModule moduleId="scannerConfiguration"> |
|
43 |
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> |
|
44 |
<scannerConfigBuildInfo instanceId="0.603687198"> |
|
45 |
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> |
|
46 |
</scannerConfigBuildInfo> |
|
47 |
</storageModule> |
|
48 |
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> |
|
49 |
<storageModule moduleId="refreshScope" versionNumber="2"> |
|
50 |
<configuration configurationName="Default"> |
|
51 |
<resource resourceType="PROJECT" workspacePath="/RT-STM32L476RG-NUCLEO"/> |
|
52 |
</configuration> |
|
53 |
</storageModule> |
|
54 |
</cproject> |
modules/RT-STM32L476RG-NUCLEO64/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>RT-STM32L476RG-NUCLEO64</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> |
|
10 |
<triggers>clean,full,incremental,</triggers> |
|
11 |
<arguments> |
|
12 |
</arguments> |
|
13 |
</buildCommand> |
|
14 |
<buildCommand> |
|
15 |
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> |
|
16 |
<triggers>full,incremental,</triggers> |
|
17 |
<arguments> |
|
18 |
</arguments> |
|
19 |
</buildCommand> |
|
20 |
</buildSpec> |
|
21 |
<natures> |
|
22 |
<nature>org.eclipse.cdt.core.cnature</nature> |
|
23 |
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> |
|
24 |
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> |
|
25 |
</natures> |
|
26 |
<linkedResources> |
|
27 |
<link> |
|
28 |
<name>board</name> |
|
29 |
<type>2</type> |
|
30 |
<locationURI>CHIBIOS/os/hal/boards/ST_NUCLEO64_L476RG</locationURI> |
|
31 |
</link> |
|
32 |
<link> |
|
33 |
<name>os</name> |
|
34 |
<type>2</type> |
|
35 |
<locationURI>CHIBIOS/os</locationURI> |
|
36 |
</link> |
|
37 |
<link> |
|
38 |
<name>test</name> |
|
39 |
<type>2</type> |
|
40 |
<locationURI>CHIBIOS/test</locationURI> |
|
41 |
</link> |
|
42 |
</linkedResources> |
|
43 |
</projectDescription> |
modules/RT-STM32L476RG-NUCLEO64/alldconf.h | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform. |
3 |
Copyright (C) 2016..2018 Thomas Schöpping et al.
|
|
3 |
Copyright (C) 2016..2019 Thomas Schöpping et al.
|
|
4 | 4 |
|
5 | 5 |
This program is free software: you can redistribute it and/or modify |
6 | 6 |
it under the terms of the GNU General Public License as published by |
... | ... | |
21 | 21 |
* @brief AMiRo-LLD configuration file for the PowerManagement v1.1 module. |
22 | 22 |
* @details Contains the application specific AMiRo-LLD settings. |
23 | 23 |
* |
24 |
* @addtogroup powermanagement_lld_config <-- anpassen
|
|
24 |
* @addtogroup STM32L476RG-NUCLEO64
|
|
25 | 25 |
* @{ |
26 | 26 |
*/ |
27 | 27 |
|
... | ... | |
42 | 42 |
* By definition time is represented at microsecond precision. |
43 | 43 |
*/ |
44 | 44 |
#define AMIROLLD_CFG_TIME_SIZE 32 |
45 |
#define AMIROLLD_CFG_USE_MPU6050 |
|
45 |
|
|
46 |
/** |
|
47 |
* @brief Enable flag for the MPU6050 IMU. |
|
48 |
*/ |
|
49 |
//#define AMIROLLD_CFG_USE_MPU6050 |
|
46 | 50 |
|
47 | 51 |
#endif /* _ALLDCONF_H_ */ |
48 | 52 |
|
modules/RT-STM32L476RG-NUCLEO64/aosconf.h | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform. |
3 |
Copyright (C) 2016..2018 Thomas Schöpping et al.
|
|
3 |
Copyright (C) 2016..2019 Thomas Schöpping et al.
|
|
4 | 4 |
|
5 | 5 |
This program is free software: you can redistribute it and/or modify |
6 | 6 |
it under the terms of the GNU General Public License as published by |
... | ... | |
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
/** |
20 |
* @file
|
|
20 |
* @file |
|
21 | 21 |
* @brief AMiRo-OS Configuration file for the PowerManagement v1.1 module. |
22 | 22 |
* @details Contains the application specific AMiRo-OS settings. |
23 | 23 |
* |
... | ... | |
62 | 62 |
|
63 | 63 |
/** |
64 | 64 |
* @brief Flag to enable/disable unit tests. |
65 |
* @note Setting this flag will implicitely enable the shell. |
|
65 | 66 |
*/ |
66 | 67 |
#if !defined(OS_CFG_TESTS_ENABLE) |
67 |
#define AMIROOS_CFG_TESTS_ENABLE true
|
|
68 |
#define AMIROOS_CFG_TESTS_ENABLE false
|
|
68 | 69 |
#else |
69 | 70 |
#define AMIROOS_CFG_TESTS_ENABLE OS_CFG_TESTS_ENABLE |
70 | 71 |
#endif |
... | ... | |
79 | 80 |
#endif |
80 | 81 |
|
81 | 82 |
/** |
83 |
* @brief Mask for the control thread to listen to certain IO events. |
|
84 |
* @note Any mandatory events (e.g. for SSSP) are enabled implicitely despite this configuration. |
|
85 |
*/ |
|
86 |
#if !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK) |
|
87 |
#define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK MODULE_OS_IOEVENTFLAGS_USERBUTTON |
|
88 |
#else |
|
89 |
#define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK OS_CFG_MAIN_LOOP_IOEVENT_MASK |
|
90 |
#endif |
|
91 |
|
|
92 |
/** |
|
82 | 93 |
* @brief Timeout value when waiting for events in the main loop in microseconds. |
83 | 94 |
* @details A value of 0 deactivates the timeout. |
84 | 95 |
*/ |
... | ... | |
106 | 117 |
#define AMIROOS_CFG_SSSP_ENABLE OS_CFG_SSSP_ENABLE |
107 | 118 |
#endif |
108 | 119 |
|
109 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
|
110 | 120 |
/** |
111 | 121 |
* @brief Flag to set the module as SSSP master. |
112 | 122 |
* @details There must be only one module with this flag set to true in a system. |
113 | 123 |
*/ |
114 | 124 |
#if !defined(OS_CFG_SSSP_MASTER) |
115 |
#define AMIROOS_CFG_SSSP_MASTER true
|
|
125 |
#define AMIROOS_CFG_SSSP_MASTER false
|
|
116 | 126 |
#else |
117 | 127 |
#define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER |
118 | 128 |
#endif |
... | ... | |
122 | 132 |
* @details There must be only one module with this flag set to true in a system. |
123 | 133 |
*/ |
124 | 134 |
#if !defined(OS_CFG_SSSP_STACK_START) |
125 |
#define AMIROOS_CFG_SSSP_STACK_START true
|
|
135 |
#define AMIROOS_CFG_SSSP_STACK_START false
|
|
126 | 136 |
#else |
127 | 137 |
#define AMIROOS_CFG_SSSP_STACK_START OS_CFG_SSSP_STACK_START |
128 | 138 |
#endif |
... | ... | |
132 | 142 |
* @details There must be only one module with this flag set to true in a system. |
133 | 143 |
*/ |
134 | 144 |
#if !defined(OS_CFG_SSSP_STACK_END) |
135 |
#define AMIROOS_CFG_SSSP_STACK_END true
|
|
145 |
#define AMIROOS_CFG_SSSP_STACK_END false
|
|
136 | 146 |
#else |
137 | 147 |
#define AMIROOS_CFG_SSSP_STACK_END OS_CFG_SSSP_STACK_END |
138 | 148 |
#endif |
... | ... | |
157 | 167 |
#define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD |
158 | 168 |
#endif |
159 | 169 |
|
160 |
#endif |
|
161 | 170 |
/** @} */ |
162 | 171 |
|
163 | 172 |
/*===========================================================================*/ |
... | ... | |
170 | 179 |
/** |
171 | 180 |
* @brief Shell enable flag. |
172 | 181 |
*/ |
173 |
#if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true) |
|
174 |
#define AMIROOS_CFG_SHELL_ENABLE true |
|
175 |
#elif (AMIROOS_CFG_TESTS_ENABLE == true) |
|
182 |
#if !defined(OS_CFG_SHELL_ENABLE) |
|
176 | 183 |
#define AMIROOS_CFG_SHELL_ENABLE true |
177 | 184 |
#else |
178 | 185 |
#define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE |
modules/RT-STM32L476RG-NUCLEO64/board.mk | ||
---|---|---|
1 |
|
|
2 |
# absolute path to this directory |
|
3 |
BOARD_DIR := $(dir $(lastword $(MAKEFILE_LIST))) |
|
4 |
|
|
5 |
# List of all the board related files. |
|
6 |
BOARDSRC = $(BOARD_DIR)board.c |
|
7 |
|
|
8 |
# Required include directories |
|
9 |
BOARDINC = $(BOARD_DIR) |
|
10 |
|
|
11 |
# linker path |
|
12 |
BOARDLD = $(BOARD_DIR) |
|
13 |
|
|
14 |
# Shared variables ??? |
|
15 |
ALLCSRC += $(BOARDSRC) |
|
16 |
ALLINC += $(BOARDINC) |
modules/RT-STM32L476RG-NUCLEO64/chconf.h | ||
---|---|---|
1 | 1 |
/* |
2 |
ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
*/ |
|
2 |
* AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform. |
|
3 |
* Copyright (C) 2016..2019 Thomas Schöpping et al. |
|
4 |
* |
|
5 |
* This program is free software: you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation, either version 3 of the License, or |
|
8 |
* (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
16 | 18 |
|
17 | 19 |
/** |
18 |
* @file templates/chconf.h |
|
19 |
* @brief Configuration file template. |
|
20 |
* @details A copy of this file must be placed in each project directory, it |
|
21 |
* contains the application specific kernel settings. |
|
20 |
* @file |
|
21 |
* @brief ChibiOS Configuration file for the STM32L476RG-NUCLEO64 board. |
|
22 |
* @details Contains the application specific kernel settings. |
|
22 | 23 |
* |
23 |
* @addtogroup config
|
|
24 |
* @addtogroup STM32L476RG-NUCLEO64
|
|
24 | 25 |
* @details Kernel related settings and hooks. |
25 | 26 |
* @{ |
26 | 27 |
*/ |
... | ... | |
48 | 49 |
#define CH_CFG_ST_RESOLUTION 32 |
49 | 50 |
#endif |
50 | 51 |
|
51 |
/** |
|
52 |
* @brief System tick frequency. |
|
53 |
* @details Frequency of the system timer that drives the system ticks. This |
|
54 |
* setting also defines the system tick time unit. |
|
55 |
*/ |
|
56 |
#if !defined(CH_CFG_ST_FREQUENCY) |
|
57 |
#define CH_CFG_ST_FREQUENCY 10000 |
|
58 |
#endif |
|
59 |
|
|
60 |
/** |
|
61 |
* @brief Time intervals data size. |
|
62 |
* @note Allowed values are 16, 32 or 64 bits. |
|
63 |
*/ |
|
64 |
#if !defined(CH_CFG_INTERVALS_SIZE) |
|
65 |
#define CH_CFG_INTERVALS_SIZE 32 |
|
66 |
#endif |
|
67 |
|
|
68 |
/** |
|
69 |
* @brief Time types data size. |
|
70 |
* @note Allowed values are 16 or 32 bits. |
|
71 |
*/ |
|
72 |
#if !defined(CH_CFG_TIME_TYPES_SIZE) |
|
73 |
#define CH_CFG_TIME_TYPES_SIZE 32 |
|
74 |
#endif |
|
75 |
|
|
76 |
/** |
|
77 |
* @brief Time delta constant for the tick-less mode. |
|
78 |
* @note If this value is zero then the system uses the classic |
|
79 |
* periodic tick. This value represents the minimum number |
|
80 |
* of ticks that is safe to specify in a timeout directive. |
|
81 |
* The value one is not valid, timeouts are rounded up to |
|
82 |
* this value. |
|
83 |
*/ |
|
84 |
#if !defined(CH_CFG_ST_TIMEDELTA) |
|
85 |
#define CH_CFG_ST_TIMEDELTA 2 |
|
86 |
#endif |
|
52 |
// more common definition in aos_chconf.h |
|
87 | 53 |
|
88 | 54 |
/** @} */ |
89 | 55 |
|
... | ... | |
94 | 60 |
*/ |
95 | 61 |
/*===========================================================================*/ |
96 | 62 |
|
97 |
/** |
|
98 |
* @brief Round robin interval. |
|
99 |
* @details This constant is the number of system ticks allowed for the |
|
100 |
* threads before preemption occurs. Setting this value to zero |
|
101 |
* disables the preemption for threads with equal priority and the |
|
102 |
* round robin becomes cooperative. Note that higher priority |
|
103 |
* threads can still preempt, the kernel is always preemptive. |
|
104 |
* @note Disabling the round robin preemption makes the kernel more compact |
|
105 |
* and generally faster. |
|
106 |
* @note The round robin preemption is not supported in tickless mode and |
|
107 |
* must be set to zero in that case. |
|
108 |
*/ |
|
109 |
#if !defined(CH_CFG_TIME_QUANTUM) |
|
110 |
#define CH_CFG_TIME_QUANTUM 0 |
|
111 |
#endif |
|
112 |
|
|
113 |
/** |
|
114 |
* @brief Managed RAM size. |
|
115 |
* @details Size of the RAM area to be managed by the OS. If set to zero |
|
116 |
* then the whole available RAM is used. The core memory is made |
|
117 |
* available to the heap allocator and/or can be used directly through |
|
118 |
* the simplified core memory allocator. |
|
119 |
* |
|
120 |
* @note In order to let the OS manage the whole RAM the linker script must |
|
121 |
* provide the @p __heap_base__ and @p __heap_end__ symbols. |
|
122 |
* @note Requires @p CH_CFG_USE_MEMCORE. |
|
123 |
*/ |
|
124 |
#if !defined(CH_CFG_MEMCORE_SIZE) |
|
125 |
#define CH_CFG_MEMCORE_SIZE 0 |
|
126 |
#endif |
|
127 |
|
|
128 |
/** |
|
129 |
* @brief Idle thread automatic spawn suppression. |
|
130 |
* @details When this option is activated the function @p chSysInit() |
|
131 |
* does not spawn the idle thread. The application @p main() |
|
132 |
* function becomes the idle thread and must implement an |
|
133 |
* infinite loop. |
|
134 |
*/ |
|
135 |
#if !defined(CH_CFG_NO_IDLE_THREAD) |
|
136 |
#define CH_CFG_NO_IDLE_THREAD FALSE |
|
137 |
#endif |
|
63 |
// common definitions in aos_chconf.h |
|
138 | 64 |
|
139 | 65 |
/** @} */ |
140 | 66 |
|
... | ... | |
145 | 71 |
*/ |
146 | 72 |
/*===========================================================================*/ |
147 | 73 |
|
148 |
/** |
|
149 |
* @brief OS optimization. |
|
150 |
* @details If enabled then time efficient rather than space efficient code |
|
151 |
* is used when two possible implementations exist. |
|
152 |
* |
|
153 |
* @note This is not related to the compiler optimization options. |
|
154 |
* @note The default is @p TRUE. |
|
155 |
*/ |
|
156 |
#if !defined(CH_CFG_OPTIMIZE_SPEED) |
|
157 |
#define CH_CFG_OPTIMIZE_SPEED TRUE |
|
158 |
#endif |
|
74 |
// common definitions in aos_chconf.h |
|
159 | 75 |
|
160 | 76 |
/** @} */ |
161 | 77 |
|
... | ... | |
166 | 82 |
*/ |
167 | 83 |
/*===========================================================================*/ |
168 | 84 |
|
169 |
/** |
|
170 |
* @brief Time Measurement APIs. |
|
171 |
* @details If enabled then the time measurement APIs are included in |
|
172 |
* the kernel. |
|
173 |
* |
|
174 |
* @note The default is @p TRUE. |
|
175 |
*/ |
|
176 |
#if !defined(CH_CFG_USE_TM) |
|
177 |
#define CH_CFG_USE_TM TRUE |
|
178 |
#endif |
|
179 |
|
|
180 |
/** |
|
181 |
* @brief Threads registry APIs. |
|
182 |
* @details If enabled then the registry APIs are included in the kernel. |
|
183 |
* |
|
184 |
* @note The default is @p TRUE. |
|
185 |
*/ |
|
186 |
#if !defined(CH_CFG_USE_REGISTRY) |
|
187 |
#define CH_CFG_USE_REGISTRY TRUE |
|
188 |
#endif |
|
189 |
|
|
190 |
/** |
|
191 |
* @brief Threads synchronization APIs. |
|
192 |
* @details If enabled then the @p chThdWait() function is included in |
|
193 |
* the kernel. |
|
194 |
* |
|
195 |
* @note The default is @p TRUE. |
|
196 |
*/ |
|
197 |
#if !defined(CH_CFG_USE_WAITEXIT) |
|
198 |
#define CH_CFG_USE_WAITEXIT TRUE |
|
199 |
#endif |
|
200 |
|
|
201 |
/** |
|
202 |
* @brief Semaphores APIs. |
|
203 |
* @details If enabled then the Semaphores APIs are included in the kernel. |
|
204 |
* |
|
205 |
* @note The default is @p TRUE. |
|
206 |
*/ |
|
207 |
#if !defined(CH_CFG_USE_SEMAPHORES) |
|
208 |
#define CH_CFG_USE_SEMAPHORES TRUE |
|
209 |
#endif |
|
210 |
|
|
211 |
/** |
|
212 |
* @brief Semaphores queuing mode. |
|
213 |
* @details If enabled then the threads are enqueued on semaphores by |
|
214 |
* priority rather than in FIFO order. |
|
215 |
* |
|
216 |
* @note The default is @p FALSE. Enable this if you have special |
|
217 |
* requirements. |
|
218 |
* @note Requires @p CH_CFG_USE_SEMAPHORES. |
|
219 |
*/ |
|
220 |
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) |
|
221 |
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
|
222 |
#endif |
|
223 |
|
|
224 |
/** |
|
225 |
* @brief Mutexes APIs. |
|
226 |
* @details If enabled then the mutexes APIs are included in the kernel. |
|
227 |
* |
|
228 |
* @note The default is @p TRUE. |
|
229 |
*/ |
|
230 |
#if !defined(CH_CFG_USE_MUTEXES) |
|
231 |
#define CH_CFG_USE_MUTEXES TRUE |
|
232 |
#endif |
|
233 |
|
|
234 |
/** |
|
235 |
* CH_CFG_USE_THREADHIERARCHY and CH_CFG_THREADHIERARCHY_ORDERED turned off by Simon Welzel on 2018-11-08 |
|
236 |
*/ |
|
237 |
#if !defined(CH_CFG_USE_THREADHIERARCHY) |
|
238 |
#define CH_CFG_USE_THREADHIERARCHY FALSE |
|
239 |
#endif |
|
240 |
|
|
241 |
#if !defined(CH_CFG_THREADHIERARCHY_ORDERED) |
|
242 |
#define CH_CFG_THREADHIERARCHY_ORDERED FALSE |
|
243 |
#endif |
|
244 |
|
|
245 |
/** |
|
246 |
* @brief Enables recursive behavior on mutexes. |
|
247 |
* @note Recursive mutexes are heavier and have an increased |
|
248 |
* memory footprint. |
|
249 |
* |
|
250 |
* @note The default is @p FALSE. |
|
251 |
* @note Requires @p CH_CFG_USE_MUTEXES. |
|
252 |
*/ |
|
253 |
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) |
|
254 |
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
|
255 |
#endif |
|
256 |
|
|
257 |
/** |
|
258 |
* @brief Conditional Variables APIs. |
|
259 |
* @details If enabled then the conditional variables APIs are included |
|
260 |
* in the kernel. |
|
261 |
* |
|
262 |
* @note The default is @p TRUE. |
|
263 |
* @note Requires @p CH_CFG_USE_MUTEXES. |
|
264 |
*/ |
|
265 |
#if !defined(CH_CFG_USE_CONDVARS) |
|
266 |
#define CH_CFG_USE_CONDVARS TRUE |
|
267 |
#endif |
|
268 |
|
|
269 |
/** |
|
270 |
* @brief Conditional Variables APIs with timeout. |
|
271 |
* @details If enabled then the conditional variables APIs with timeout |
|
272 |
* specification are included in the kernel. |
|
273 |
* |
|
274 |
* @note The default is @p TRUE. |
|
275 |
* @note Requires @p CH_CFG_USE_CONDVARS. |
|
276 |
*/ |
|
277 |
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) |
|
278 |
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
|
279 |
#endif |
|
280 |
|
|
281 |
/** |
|
282 |
* @brief Events Flags APIs. |
|
283 |
* @details If enabled then the event flags APIs are included in the kernel. |
|
284 |
* |
|
285 |
* @note The default is @p TRUE. |
|
286 |
*/ |
|
287 |
#if !defined(CH_CFG_USE_EVENTS) |
|
288 |
#define CH_CFG_USE_EVENTS TRUE |
|
289 |
#endif |
|
290 |
|
|
291 |
/** |
|
292 |
* @brief Events Flags APIs with timeout. |
|
293 |
* @details If enabled then the events APIs with timeout specification |
|
294 |
* are included in the kernel. |
|
295 |
* |
|
296 |
* @note The default is @p TRUE. |
|
297 |
* @note Requires @p CH_CFG_USE_EVENTS. |
|
298 |
*/ |
|
299 |
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) |
|
300 |
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
|
301 |
#endif |
|
302 |
|
|
303 |
/** |
|
304 |
* @brief Synchronous Messages APIs. |
|
305 |
* @details If enabled then the synchronous messages APIs are included |
|
306 |
* in the kernel. |
|
307 |
* |
|
308 |
* @note The default is @p TRUE. |
|
309 |
*/ |
|
310 |
#if !defined(CH_CFG_USE_MESSAGES) |
|
311 |
#define CH_CFG_USE_MESSAGES TRUE |
|
312 |
#endif |
|
313 |
|
|
314 |
/** |
|
315 |
* @brief Synchronous Messages queuing mode. |
|
316 |
* @details If enabled then messages are served by priority rather than in |
|
317 |
* FIFO order. |
|
318 |
* |
|
319 |
* @note The default is @p FALSE. Enable this if you have special |
|
320 |
* requirements. |
|
321 |
* @note Requires @p CH_CFG_USE_MESSAGES. |
|
322 |
*/ |
|
323 |
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) |
|
324 |
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
|
325 |
#endif |
|
326 |
|
|
327 |
/** |
|
328 |
* @brief Mailboxes APIs. |
|
329 |
* @details If enabled then the asynchronous messages (mailboxes) APIs are |
|
330 |
* included in the kernel. |
|
331 |
* |
|
332 |
* @note The default is @p TRUE. |
|
333 |
* @note Requires @p CH_CFG_USE_SEMAPHORES. |
|
334 |
*/ |
|
335 |
#if !defined(CH_CFG_USE_MAILBOXES) |
|
336 |
#define CH_CFG_USE_MAILBOXES TRUE |
|
337 |
#endif |
|
338 |
|
|
339 |
/** |
|
340 |
* @brief Core Memory Manager APIs. |
|
341 |
* @details If enabled then the core memory manager APIs are included |
|
342 |
* in the kernel. |
|
343 |
* |
|
344 |
* @note The default is @p TRUE. |
|
345 |
*/ |
|
346 |
#if !defined(CH_CFG_USE_MEMCORE) |
|
347 |
#define CH_CFG_USE_MEMCORE TRUE |
|
348 |
#endif |
|
349 |
|
|
350 |
/** |
|
351 |
* @brief Heap Allocator APIs. |
|
352 |
* @details If enabled then the memory heap allocator APIs are included |
|
353 |
* in the kernel. |
|
354 |
* |
|
355 |
* @note The default is @p TRUE. |
|
356 |
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or |
|
357 |
* @p CH_CFG_USE_SEMAPHORES. |
|
358 |
* @note Mutexes are recommended. |
|
359 |
*/ |
|
360 |
#if !defined(CH_CFG_USE_HEAP) |
|
361 |
#define CH_CFG_USE_HEAP TRUE |
|
362 |
#endif |
|
363 |
|
|
364 |
/** |
|
365 |
* @brief Memory Pools Allocator APIs. |
|
366 |
* @details If enabled then the memory pools allocator APIs are included |
|
367 |
* in the kernel. |
|
368 |
* |
|
369 |
* @note The default is @p TRUE. |
|
370 |
*/ |
|
371 |
#if !defined(CH_CFG_USE_MEMPOOLS) |
|
372 |
#define CH_CFG_USE_MEMPOOLS TRUE |
|
373 |
#endif |
|
374 |
|
|
375 |
/** |
|
376 |
* @brief Objects FIFOs APIs. |
|
377 |
* @details If enabled then the objects FIFOs APIs are included |
|
378 |
* in the kernel. |
|
379 |
* |
|
380 |
* @note The default is @p TRUE. |
|
381 |
*/ |
|
382 |
#if !defined(CH_CFG_USE_OBJ_FIFOS) |
|
383 |
#define CH_CFG_USE_OBJ_FIFOS TRUE |
|
384 |
#endif |
|
385 |
|
|
386 |
/** |
|
387 |
* @brief Dynamic Threads APIs. |
|
388 |
* @details If enabled then the dynamic threads creation APIs are included |
|
389 |
* in the kernel. |
|
390 |
* |
|
391 |
* @note The default is @p TRUE. |
|
392 |
* @note Requires @p CH_CFG_USE_WAITEXIT. |
|
393 |
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. |
|
394 |
*/ |
|
395 |
#if !defined(CH_CFG_USE_DYNAMIC) |
|
396 |
#define CH_CFG_USE_DYNAMIC TRUE |
|
397 |
#endif |
|
85 |
// common definitions in aos_chconf.h |
|
398 | 86 |
|
399 | 87 |
/** @} */ |
400 | 88 |
|
... | ... | |
405 | 93 |
*/ |
406 | 94 |
/*===========================================================================*/ |
407 | 95 |
|
408 |
/** |
|
409 |
* @brief Objects Factory APIs. |
|
410 |
* @details If enabled then the objects factory APIs are included in the |
|
411 |
* kernel. |
|
412 |
* |
|
413 |
* @note The default is @p FALSE. |
|
414 |
*/ |
|
415 |
#if !defined(CH_CFG_USE_FACTORY) |
|
416 |
#define CH_CFG_USE_FACTORY TRUE |
|
417 |
#endif |
|
418 |
|
|
419 |
/** |
|
420 |
* @brief Maximum length for object names. |
|
421 |
* @details If the specified length is zero then the name is stored by |
|
422 |
* pointer but this could have unintended side effects. |
|
423 |
*/ |
|
424 |
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) |
|
425 |
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 |
|
426 |
#endif |
|
427 |
|
|
428 |
/** |
|
429 |
* @brief Enables the registry of generic objects. |
|
430 |
*/ |
|
431 |
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) |
|
432 |
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE |
|
433 |
#endif |
|
434 |
|
|
435 |
/** |
|
436 |
* @brief Enables factory for generic buffers. |
|
437 |
*/ |
|
438 |
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) |
|
439 |
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE |
|
440 |
#endif |
|
441 |
|
|
442 |
/** |
|
443 |
* @brief Enables factory for semaphores. |
|
444 |
*/ |
|
445 |
#if !defined(CH_CFG_FACTORY_SEMAPHORES) |
|
446 |
#define CH_CFG_FACTORY_SEMAPHORES TRUE |
|
447 |
#endif |
|
448 |
|
|
449 |
/** |
|
450 |
* @brief Enables factory for mailboxes. |
|
451 |
*/ |
|
452 |
#if !defined(CH_CFG_FACTORY_MAILBOXES) |
|
453 |
#define CH_CFG_FACTORY_MAILBOXES TRUE |
|
454 |
#endif |
|
455 |
|
|
456 |
/** |
|
457 |
* @brief Enables factory for objects FIFOs. |
|
458 |
*/ |
|
459 |
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) |
|
460 |
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE |
|
461 |
#endif |
|
96 |
// common definitions in aos_chconf.h |
|
462 | 97 |
|
463 | 98 |
/** @} */ |
464 | 99 |
|
... | ... | |
469 | 104 |
*/ |
470 | 105 |
/*===========================================================================*/ |
471 | 106 |
|
472 |
/** |
|
473 |
* @brief Debug option, kernel statistics. |
|
474 |
* |
|
475 |
* @note The default is @p FALSE. |
|
476 |
*/ |
|
477 |
#if !defined(CH_DBG_STATISTICS) |
|
478 |
#define CH_DBG_STATISTICS FALSE |
|
479 |
#endif |
|
480 |
|
|
481 |
/** |
|
482 |
* @brief Debug option, system state check. |
|
483 |
* @details If enabled the correct call protocol for system APIs is checked |
|
484 |
* at runtime. |
|
485 |
* |
|
486 |
* @note The default is @p FALSE. |
|
487 |
*/ |
|
488 |
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) |
|
489 |
#define CH_DBG_SYSTEM_STATE_CHECK FALSE |
|
490 |
#endif |
|
491 |
|
|
492 |
/** |
|
493 |
* @brief Debug option, parameters checks. |
|
494 |
* @details If enabled then the checks on the API functions input |
|
495 |
* parameters are activated. |
|
496 |
* |
|
497 |
* @note The default is @p FALSE. |
|
498 |
*/ |
|
499 |
#if !defined(CH_DBG_ENABLE_CHECKS) |
|
500 |
#define CH_DBG_ENABLE_CHECKS FALSE |
|
501 |
#endif |
|
502 |
|
|
503 |
/** |
|
504 |
* @brief Debug option, consistency checks. |
|
505 |
* @details If enabled then all the assertions in the kernel code are |
|
506 |
* activated. This includes consistency checks inside the kernel, |
|
507 |
* runtime anomalies and port-defined checks. |
|
508 |
* |
|
509 |
* @note The default is @p FALSE. |
|
510 |
*/ |
|
511 |
#if !defined(CH_DBG_ENABLE_ASSERTS) |
|
512 |
#define CH_DBG_ENABLE_ASSERTS FALSE |
|
513 |
#endif |
|
514 |
|
|
515 |
/** |
|
516 |
* @brief Debug option, trace buffer. |
|
517 |
* @details If enabled then the trace buffer is activated. |
|
518 |
* |
|
519 |
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED. |
|
520 |
*/ |
|
521 |
#if !defined(CH_DBG_TRACE_MASK) |
|
522 |
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
|
523 |
#endif |
|
524 |
|
|
525 |
/** |
|
526 |
* @brief Trace buffer entries. |
|
527 |
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is |
|
528 |
* different from @p CH_DBG_TRACE_MASK_DISABLED. |
|
529 |
*/ |
|
530 |
#if !defined(CH_DBG_TRACE_BUFFER_SIZE) |
|
531 |
#define CH_DBG_TRACE_BUFFER_SIZE 128 |
|
532 |
#endif |
|
533 |
|
|
534 |
/** |
|
535 |
* @brief Debug option, stack checks. |
|
536 |
* @details If enabled then a runtime stack check is performed. |
|
537 |
* |
|
538 |
* @note The default is @p FALSE. |
|
539 |
* @note The stack check is performed in a architecture/port dependent way. |
|
540 |
* It may not be implemented or some ports. |
|
541 |
* @note The default failure mode is to halt the system with the global |
|
542 |
* @p panic_msg variable set to @p NULL. |
|
543 |
*/ |
|
544 |
#if !defined(CH_DBG_ENABLE_STACK_CHECK) |
|
545 |
#define CH_DBG_ENABLE_STACK_CHECK FALSE |
|
546 |
#endif |
|
547 |
|
|
548 |
/** |
|
549 |
* @brief Debug option, stacks initialization. |
|
550 |
* @details If enabled then the threads working area is filled with a byte |
|
551 |
* value when a thread is created. This can be useful for the |
|
552 |
* runtime measurement of the used stack. |
|
553 |
* |
|
554 |
* @note The default is @p FALSE. |
|
555 |
*/ |
|
556 |
#if !defined(CH_DBG_FILL_THREADS) |
|
557 |
#define CH_DBG_FILL_THREADS FALSE |
|
558 |
#endif |
|
559 |
|
|
560 |
/** |
|
561 |
* @brief Debug option, threads profiling. |
|
562 |
* @details If enabled then a field is added to the @p thread_t structure that |
|
563 |
* counts the system ticks occurred while executing the thread. |
|
564 |
* |
|
565 |
* @note The default is @p FALSE. |
|
566 |
* @note This debug option is not currently compatible with the |
|
567 |
* tickless mode. |
|
568 |
*/ |
|
569 |
#if !defined(CH_DBG_THREADS_PROFILING) |
|
570 |
#define CH_DBG_THREADS_PROFILING FALSE |
|
571 |
#endif |
|
107 |
// common definitions in aos_chconf.h |
|
572 | 108 |
|
573 | 109 |
/** @} */ |
574 | 110 |
|
... | ... | |
579 | 115 |
*/ |
580 | 116 |
/*===========================================================================*/ |
581 | 117 |
|
582 |
/** |
|
583 |
* @brief System structure extension. |
|
584 |
* @details User fields added to the end of the @p ch_system_t structure. |
|
585 |
*/ |
|
586 |
#define CH_CFG_SYSTEM_EXTRA_FIELDS \ |
|
587 |
/* Add threads custom fields here.*/ |
|
588 |
|
|
589 |
/** |
|
590 |
* @brief System initialization hook. |
|
591 |
* @details User initialization code added to the @p chSysInit() function |
|
592 |
* just before interrupts are enabled globally. |
|
593 |
*/ |
|
594 |
#define CH_CFG_SYSTEM_INIT_HOOK() { \ |
|
595 |
/* Add threads initialization code here.*/ \ |
|
596 |
} |
|
597 |
|
|
598 |
/** |
|
599 |
* @brief Threads descriptor structure extension. |
|
600 |
* @details User fields added to the end of the @p thread_t structure. |
|
601 |
*/ |
|
602 |
#define CH_CFG_THREAD_EXTRA_FIELDS \ |
|
603 |
/* Add threads custom fields here.*/ |
|
604 |
|
|
605 |
/** |
|
606 |
* @brief Threads initialization hook. |
|
607 |
* @details User initialization code added to the @p _thread_init() function. |
|
608 |
* |
|
609 |
* @note It is invoked from within @p _thread_init() and implicitly from all |
|
610 |
* the threads creation APIs. |
|
611 |
*/ |
|
612 |
#define CH_CFG_THREAD_INIT_HOOK(tp) { \ |
|
613 |
/* Add threads initialization code here.*/ \ |
|
614 |
} |
|
118 |
// common definitions in aos_chconf.h |
|
615 | 119 |
|
616 |
/** |
|
617 |
* @brief Threads finalization hook. |
|
618 |
* @details User finalization code added to the @p chThdExit() API. |
|
619 |
*/ |
|
620 |
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ |
|
621 |
/* Add threads finalization code here.*/ \ |
|
622 |
} |
|
623 |
|
|
624 |
/** |
|
625 |
* @brief Context switch hook. |
|
626 |
* @details This hook is invoked just before switching between threads. |
|
627 |
*/ |
|
628 |
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ |
|
629 |
/* Context switch code here.*/ \ |
|
630 |
} |
|
631 |
|
|
632 |
/** |
|
633 |
* @brief ISR enter hook. |
|
634 |
*/ |
|
635 |
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ |
|
636 |
/* IRQ prologue code here.*/ \ |
|
637 |
} |
|
638 |
|
|
639 |
/** |
|
640 |
* @brief ISR exit hook. |
|
641 |
*/ |
|
642 |
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ |
|
643 |
/* IRQ epilogue code here.*/ \ |
|
644 |
} |
|
645 |
|
|
646 |
/** |
|
647 |
* @brief Idle thread enter hook. |
|
648 |
* @note This hook is invoked within a critical zone, no OS functions |
|
649 |
* should be invoked from here. |
|
650 |
* @note This macro can be used to activate a power saving mode. |
|
651 |
*/ |
|
652 |
#define CH_CFG_IDLE_ENTER_HOOK() { \ |
|
653 |
/* Idle-enter code here.*/ \ |
|
654 |
} |
|
655 |
|
|
656 |
/** |
|
657 |
* @brief Idle thread leave hook. |
|
658 |
* @note This hook is invoked within a critical zone, no OS functions |
|
659 |
* should be invoked from here. |
|
660 |
* @note This macro can be used to deactivate a power saving mode. |
|
661 |
*/ |
|
662 |
#define CH_CFG_IDLE_LEAVE_HOOK() { \ |
|
663 |
/* Idle-leave code here.*/ \ |
|
664 |
} |
|
120 |
/** @} */ |
|
665 | 121 |
|
122 |
/*===========================================================================*/ |
|
666 | 123 |
/** |
667 |
* @brief Idle Loop hook.
|
|
668 |
* @details This hook is continuously invoked by the idle thread loop.
|
|
124 |
* @name Port-specific settings (override port settings defaulted in chcore.h).
|
|
125 |
* @{
|
|
669 | 126 |
*/ |
670 |
#define CH_CFG_IDLE_LOOP_HOOK() { \ |
|
671 |
/* Idle loop code here.*/ \ |
|
672 |
} |
|
127 |
/*===========================================================================*/ |
|
673 | 128 |
|
674 |
/** |
|
675 |
* @brief System tick event hook. |
|
676 |
* @details This hook is invoked in the system tick handler immediately |
|
677 |
* after processing the virtual timers queue. |
|
678 |
*/ |
|
679 |
#define CH_CFG_SYSTEM_TICK_HOOK() { \ |
|
680 |
/* System tick event code here.*/ \ |
|
681 |
} |
|
129 |
/** @} */ |
|
682 | 130 |
|
131 |
/*===========================================================================*/ |
|
683 | 132 |
/** |
684 |
* @brief System halt hook. |
|
685 |
* @details This hook is invoked in case to a system halting error before |
|
686 |
* the system is halted. |
|
133 |
* @name other |
|
134 |
* @{ |
|
687 | 135 |
*/ |
688 |
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ |
|
689 |
/* System halt code here.*/ \ |
|
690 |
} |
|
136 |
/*===========================================================================*/ |
|
691 | 137 |
|
692 |
/** |
|
693 |
* @brief Trace hook. |
|
694 |
* @details This hook is invoked each time a new record is written in the |
|
695 |
* trace buffer. |
|
696 |
*/ |
|
697 |
#define CH_CFG_TRACE_HOOK(tep) { \ |
|
698 |
/* Trace code here.*/ \ |
|
699 |
} |
|
138 |
// common definitions in aos_chconf.h |
|
700 | 139 |
|
701 | 140 |
/** @} */ |
702 | 141 |
|
703 |
/*===========================================================================*/ |
|
704 |
/* Port-specific settings (override port settings defaulted in chcore.h). */ |
|
705 |
/*===========================================================================*/ |
|
706 |
|
|
707 |
//#include <aos_chconf.h> |
|
142 |
#include <aos_chconf.h> |
|
708 | 143 |
|
709 | 144 |
#endif /* CHCONF_H */ |
710 | 145 |
|
modules/RT-STM32L476RG-NUCLEO64/halconf.h | ||
---|---|---|
1 | 1 |
/* |
2 |
ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio |
|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform. |
|
3 |
Copyright (C) 2016..2019 Thomas Schöpping et al. |
|
3 | 4 |
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU General Public License as published by |
|
7 |
the Free Software Foundation, either version 3 of the License, or |
|
8 |
(at your option) any later version. |
|
7 | 9 |
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU General Public License for more details. |
|
9 | 14 |
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
You should have received a copy of the GNU General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | 17 |
*/ |
16 | 18 |
|
17 | 19 |
/** |
18 |
* @file templates/halconf.h
|
|
19 |
* @brief HAL configuration header. |
|
20 |
* @file |
|
21 |
* @brief HAL configuration header for the STM32L476RG-NUCLEO64 module.
|
|
20 | 22 |
* @details HAL configuration file, this file allows to enable or disable the |
21 | 23 |
* various device drivers from your application. You may also use |
22 | 24 |
* this file in order to override the device drivers default settings. |
23 | 25 |
* |
24 |
* @addtogroup HAL_CONF |
|
26 |
* @addtogroup STM32L476RGNUCLEO64_HAL_CONF
|
|
25 | 27 |
* @{ |
26 | 28 |
*/ |
27 | 29 |
|
28 |
#ifndef HALCONF_H
|
|
29 |
#define HALCONF_H
|
|
30 |
#ifndef _HALCONF_H_
|
|
31 |
#define _HALCONF_H_
|
|
30 | 32 |
|
31 | 33 |
#define _CHIBIOS_HAL_CONF_ |
32 | 34 |
#define _CHIBIOS_HAL_CONF_VER_6_0_ |
... | ... | |
51 | 53 |
* @brief Enables the CAN subsystem. |
52 | 54 |
*/ |
53 | 55 |
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) |
54 |
#define HAL_USE_CAN TRUE
|
|
56 |
#define HAL_USE_CAN FALSE
|
|
55 | 57 |
#endif |
56 | 58 |
|
57 | 59 |
/** |
... | ... | |
125 | 127 |
#endif |
126 | 128 |
|
127 | 129 |
/** |
130 |
* @brief Enables the QEI subsystem. |
|
131 |
*/ |
|
132 |
#if !defined(HAL_USE_QEI) || defined(__DOXYGEN__) |
|
133 |
#define HAL_USE_QEI FALSE |
|
134 |
#endif |
|
135 |
|
|
136 |
/** |
|
128 | 137 |
* @brief Enables the QSPI subsystem. |
129 | 138 |
*/ |
130 | 139 |
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) |
... | ... | |
235 | 244 |
* @brief Sleep mode related APIs inclusion switch. |
236 | 245 |
*/ |
237 | 246 |
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) |
238 |
#define CAN_USE_SLEEP_MODE FALSE
|
|
247 |
#define CAN_USE_SLEEP_MODE TRUE
|
|
239 | 248 |
#endif |
240 | 249 |
|
241 | 250 |
/** |
... | ... | |
313 | 322 |
* @brief Enables an event sources for incoming packets. |
314 | 323 |
*/ |
315 | 324 |
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) |
316 |
#define MAC_USE_EVENTS FALSE
|
|
325 |
#define MAC_USE_EVENTS TRUE
|
|
317 | 326 |
#endif |
318 | 327 |
|
319 | 328 |
/*===========================================================================*/ |
... | ... | |
329 | 338 |
* use a DMA channel and heavily loads the CPU. |
330 | 339 |
*/ |
331 | 340 |
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) |
332 |
#define MMC_NICE_WAITING FALSE
|
|
341 |
#define MMC_NICE_WAITING TRUE
|
|
333 | 342 |
#endif |
334 | 343 |
|
335 | 344 |
/*===========================================================================*/ |
... | ... | |
380 | 389 |
* lower priority, this may slow down the driver a bit however. |
381 | 390 |
*/ |
382 | 391 |
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) |
383 |
#define SDC_NICE_WAITING FALSE
|
|
392 |
#define SDC_NICE_WAITING TRUE
|
|
384 | 393 |
#endif |
385 | 394 |
|
386 | 395 |
/** |
... | ... | |
407 | 416 |
* default configuration. |
408 | 417 |
*/ |
409 | 418 |
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) |
410 |
#define SERIAL_DEFAULT_BITRATE 38400
|
|
419 |
#define SERIAL_DEFAULT_BITRATE 115200
|
|
411 | 420 |
#endif |
412 | 421 |
|
413 | 422 |
/** |
... | ... | |
513 | 522 |
#define USB_USE_WAIT FALSE |
514 | 523 |
#endif |
515 | 524 |
|
516 |
#endif /* HALCONF_H */
|
|
525 |
#endif /* _HALCONF_H_ */
|
|
517 | 526 |
|
518 | 527 |
/** @} */ |
modules/RT-STM32L476RG-NUCLEO64/module (Kopie).h | ||
---|---|---|
1 |
/* |
|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform. |
|
3 |
Copyright (C) 2016..2018 Thomas Schöpping et al. |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU General Public License as published by |
|
7 |
the Free Software Foundation, either version 3 of the License, or |
|
8 |
(at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
|
|
19 |
/** |
|
20 |
* @file |
|
21 |
* @brief Structures and constant for the PowerManagement module. |
|
22 |
* |
|
23 |
* @addtogroup powermanagement_module |
|
24 |
* @{ |
|
25 |
*/ |
|
26 |
|
|
27 |
#ifndef _AMIROOS_MODULE_H_ |
|
28 |
#define _AMIROOS_MODULE_H_ |
|
29 |
|
|
30 |
/*===========================================================================*/ |
|
31 |
/** |
|
32 |
* @name Module specific functions |
|
33 |
* @{ |
|
34 |
*/ |
|
35 |
/*===========================================================================*/ |
|
36 |
|
|
37 |
/* |
|
38 |
* @brief Makro to store data in the core coupled memory (ccm). |
|
39 |
* Example: |
|
40 |
* int compute_buffer[128] CCM_RAM; |
|
41 |
* |
|
42 |
* @note The ccm is not connected to any bus system. |
|
43 |
*/ |
|
44 |
#define CCM_RAM __attribute__((section(".ram4"), aligned(4))) |
|
45 |
|
|
46 |
/* |
|
47 |
* @brief Makro to store data in the ethernet memory (eth). |
|
48 |
* Example: |
|
49 |
* int dma_buffer[128] ETH_RAM; |
|
50 |
* |
|
51 |
* @note The eth is a dedicated memory block with its own DMA controller. |
|
52 |
*/ |
|
53 |
#define ETH_RAM __attribute__((section(".ram2"), aligned(4))) |
|
54 |
|
|
55 |
/* |
|
56 |
* @brief Makro to store data in the backup memory (bckp). |
|
57 |
* Example: |
|
58 |
* int backup_buffer[128] BCKP_RAM; |
|
59 |
* |
|
60 |
* @note The eth is a dedicated memory block with its own DMA controller. |
|
61 |
*/ |
|
62 |
#define BCKP_RAM __attribute__((section(".ram5"), aligned(4))) |
|
63 |
|
|
64 |
/** @} */ |
|
65 |
|
|
66 |
/*===========================================================================*/ |
|
67 |
/** |
|
68 |
* @name ChibiOS/HAL configuration |
|
69 |
* @{ |
|
70 |
*/ |
|
71 |
/*===========================================================================*/ |
|
72 |
#include <hal.h> |
|
73 |
|
|
74 |
/** |
|
75 |
* @brief ADC driver for reading the system voltage. |
|
76 |
*/ |
|
77 |
#define MODULE_HAL_ADC_VSYS ADCD1 |
|
78 |
|
|
79 |
/** |
|
80 |
* @brief Configuration for the ADC. |
|
81 |
*/ |
|
82 |
//extern ADCConversionGroup moduleHalAdcVsysConversionGroup; |
|
83 |
|
|
84 |
/** |
|
85 |
* @brief CAN driver to use. |
|
86 |
*/ |
|
87 |
#define MODULE_HAL_CAN CAND1 |
|
88 |
|
|
89 |
/** |
|
90 |
* @brief Configuration for the CAN driver. |
|
91 |
*/ |
|
92 |
//extern CANConfig moduleHalCanConfig; |
|
93 |
|
|
94 |
/** |
|
95 |
* @brief I2C driver to access multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery). |
|
96 |
*/ |
|
97 |
#define MODULE_HAL_I2C_PROX_PM18_PM33_GAUGEREAR I2CD1 |
|
98 |
|
|
99 |
/** |
|
100 |
* @brief Configuration for the multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery) I2C driver. |
|
101 |
*/ |
|
102 |
//extern I2CConfig moduleHalI2cProxPm18Pm33GaugeRearConfig; |
|
103 |
|
|
104 |
/** |
|
105 |
* @brief I2C driver to access multiplexer, proximity sensors 5 to 8, power monitors for VSYS4.2, VIO 5.0 and VDD, EEPROM, touch sensor, and fuel gauge (front battery). |
|
106 |
*/ |
|
107 |
#define MODULE_HAL_I2C_PROX_PM42_PM50_PMVDD_EEPROM_TOUCH_GAUGEFRONT I2CD2 |
|
108 |
|
|
109 |
/** |
|
110 |
* @brief Configuration for the multiplexer, proximity sensors 1 to 4, power monitors for VIO1.8 and VIO 3.3, and fuel gauge (rear battery) I2C driver. |
|
111 |
*/ |
|
112 |
//extern I2CConfig moduleHalI2cProxPm42Pm50PmVddEepromTouchGaugeFrontConfig; |
|
113 |
|
|
114 |
/** |
|
115 |
* @brief PWM driver for the buzzer. |
|
116 |
*/ |
|
117 |
#define MODULE_HAL_PWM_BUZZER PWMD3 |
|
118 |
|
|
119 |
/** |
|
120 |
* @brief Configuration of the PWM driver. |
|
121 |
*/ |
|
122 |
//extern PWMConfig moduleHalPwmBuzzerConfig; |
|
123 |
|
|
124 |
/** |
|
125 |
* @brief PWM channeö for the buzzer. |
|
126 |
*/ |
|
127 |
#define MODULE_HAL_PWM_BUZZER_CHANNEL 1 |
|
128 |
|
|
129 |
/** |
|
130 |
* @brief Serial driver of the programmer interface. |
|
131 |
*/ |
|
132 |
#define MODULE_HAL_PROGIF SD1 |
|
133 |
|
|
134 |
/** |
|
135 |
* @brief Configuration for the programmer serial interface driver. |
|
136 |
*/ |
|
137 |
extern SerialConfig moduleHalProgIfConfig; |
|
138 |
|
|
139 |
/** |
|
140 |
* @brief Real-Time Clock driver. |
|
141 |
*/ |
|
142 |
//#define MODULE_HAL_RTC RTCD1 |
|
143 |
|
|
144 |
/** @} */ |
|
145 |
|
|
146 |
/*===========================================================================*/ |
|
147 |
/** |
|
148 |
* @name GPIO definitions |
|
149 |
* @{ |
|
150 |
*/ |
|
151 |
/*===========================================================================*/ |
|
152 |
#include <amiro-lld.h> |
|
153 |
|
|
154 |
/** |
|
155 |
* @brief SYS_REG_EN output signal GPIO. |
|
156 |
*/ |
|
157 |
extern ROMCONST apalControlGpio_t moduleGpioSysRegEn; |
|
158 |
|
|
159 |
/** |
|
160 |
* @brief IR_INT1 input signal GPIO. |
|
161 |
*/ |
|
162 |
extern ROMCONST apalControlGpio_t moduleGpioIrInt1; |
|
163 |
|
|
164 |
/** |
|
165 |
* @brief POWER_EN output signal GPIO. |
|
166 |
*/ |
|
167 |
extern ROMCONST apalControlGpio_t moduleGpioPowerEn; |
|
168 |
|
|
169 |
/** |
|
170 |
* @brief SYS_UART_DN bidirectional signal GPIO. |
|
171 |
*/ |
|
172 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartDn; |
|
173 |
|
|
174 |
/** |
|
175 |
* @brief CHARGE_STAT2A input signal GPIO. |
|
176 |
*/ |
|
177 |
extern ROMCONST apalControlGpio_t moduleGpioChargeStat2A; |
|
178 |
|
|
179 |
/** |
|
180 |
* @brief GAUGE_BATLOW2 input signal GPIO. |
|
181 |
*/ |
|
182 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2; |
|
183 |
|
|
184 |
/** |
|
185 |
* @brief GAUGE_BATGD2 input signal GPIO. |
|
186 |
*/ |
|
187 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2; |
|
188 |
|
|
189 |
/** |
|
190 |
* @brief LED output signal GPIO. |
|
191 |
*/ |
|
192 |
extern ROMCONST apalControlGpio_t moduleGpioLed; |
|
193 |
|
|
194 |
/** |
|
195 |
* @brief SYS_UART_UP bidirectional signal GPIO. |
|
196 |
*/ |
|
197 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartUp; |
|
198 |
|
|
199 |
/** |
|
200 |
* @brief CHARGE_STAT1A input signal GPIO. |
|
201 |
*/ |
|
202 |
extern ROMCONST apalControlGpio_t moduleGpioChargeStat1A; |
|
203 |
|
|
204 |
/** |
|
205 |
* @brief GAUGE_BATLOW1 input signal GPIO. |
|
206 |
*/ |
|
207 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1; |
|
208 |
|
|
209 |
/** |
|
210 |
* @brief GAUGE_BATGD1 input signal GPIO. |
|
211 |
*/ |
|
212 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1; |
|
213 |
|
|
214 |
/** |
|
215 |
* @brief CHARG_EN1 output signal GPIO. |
|
216 |
*/ |
|
217 |
extern ROMCONST apalControlGpio_t moduleGpioChargeEn1; |
|
218 |
|
|
219 |
/** |
|
220 |
* @brief IR_INT2 input signal GPIO. |
|
221 |
*/ |
|
222 |
extern ROMCONST apalControlGpio_t moduleGpioIrInt2; |
|
223 |
|
|
224 |
/** |
|
225 |
* @brief TOUCH_INT input signal GPIO. |
|
226 |
*/ |
|
227 |
extern ROMCONST apalControlGpio_t moduleGpioTouchInt; |
|
228 |
|
|
229 |
/** |
|
230 |
* @brief SYS_DONE input signal GPIO. |
|
231 |
*/ |
|
232 |
extern ROMCONST apalControlGpio_t moduleGpioSysDone; |
|
233 |
|
|
234 |
/** |
|
235 |
* @brief SYS_PROG output signal GPIO. |
|
236 |
*/ |
|
237 |
extern ROMCONST apalControlGpio_t moduleGpioSysProg; |
|
238 |
|
|
239 |
/** |
|
240 |
* @brief PATH_DC input signal GPIO. |
|
241 |
*/ |
|
242 |
extern ROMCONST apalControlGpio_t moduleGpioPathDc; |
|
243 |
|
|
244 |
/** |
|
245 |
* @brief SYS_SPI_DIR bidirectional signal GPIO. |
|
246 |
*/ |
|
247 |
extern ROMCONST apalControlGpio_t moduleGpioSysSpiDir; |
|
248 |
|
|
249 |
/** |
|
250 |
* @brief SYS_SYNC bidirectional signal GPIO. |
|
251 |
*/ |
|
252 |
extern ROMCONST apalControlGpio_t moduleGpioSysSync; |
|
253 |
|
|
254 |
/** |
|
255 |
* @brief SYS_PD bidirectional signal GPIO. |
|
256 |
*/ |
|
257 |
extern ROMCONST apalControlGpio_t moduleGpioSysPd; |
|
258 |
|
|
259 |
/** |
|
260 |
* @brief SYS_WARMRST bidirectional signal GPIO. |
|
261 |
*/ |
|
262 |
extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst; |
|
263 |
|
|
264 |
/** |
|
265 |
* @brief BT_RST output signal GPIO. |
|
266 |
*/ |
|
267 |
extern ROMCONST apalControlGpio_t moduleGpioBtRst; |
|
268 |
|
|
269 |
/** |
|
270 |
* @brief CHARGE_EN2 output signal GPIO. |
|
271 |
*/ |
|
272 |
extern ROMCONST apalControlGpio_t moduleGpioChargeEn2; |
|
273 |
|
|
274 |
/** @} */ |
|
275 |
|
|
276 |
/*===========================================================================*/ |
|
277 |
/** |
|
278 |
* @name AMiRo-OS core configurations |
|
279 |
* @{ |
|
280 |
*/ |
|
281 |
/*===========================================================================*/ |
|
282 |
|
|
283 |
/** |
|
284 |
* @brief Event flag to be set on a IR_INT1 / CHARGE_STAT1A interrupt. |
|
285 |
*/ |
|
286 |
#define MODULE_OS_IOEVENTFLAGS_IRINT1 ((eventflags_t)1 << GPIOB_IR_INT1_N) |
|
287 |
|
|
288 |
/** |
|
289 |
* @brief Event flag to be set on a GAUGE_BATLOW1 interrupt. |
|
290 |
*/ |
|
291 |
#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW1 ((eventflags_t)1 << GPIOC_GAUGE_BATLOW1) |
|
292 |
|
|
293 |
/** |
|
294 |
* @brief Event flag to be set on a GAUGE_BATGD1 interrupt. |
|
295 |
*/ |
|
296 |
#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD1 ((eventflags_t)1 << GPIOC_GAUGE_BATGD1_N) |
|
297 |
|
|
298 |
/** |
|
299 |
* @brief Event flag to be set on a SYS_UART_DN interrupt. |
|
300 |
*/ |
|
301 |
#define MODULE_OS_IOEVENTFLAGS_SYSUARTDN ((eventflags_t)1 << GPIOB_SYS_UART_DN) |
|
302 |
|
|
303 |
/** |
|
304 |
* @brief Event flag to be set on a IR_INT2 / CHARGE_STAT2A interrupt. |
|
305 |
*/ |
|
306 |
#define MODULE_OS_IOEVENTFLAGS_IRINT2 ((eventflags_t)1 << GPIOC_IR_INT2_N) |
|
307 |
|
|
308 |
/** |
|
309 |
* @brief Event flag to be set on a TOUCH_INT interrupt. |
|
310 |
*/ |
|
311 |
#define MODULE_OS_IOEVENTFLAGS_TOUCHINT ((eventflags_t)1 << GPIOC_TOUCH_INT_N) |
|
312 |
|
|
313 |
/** |
|
314 |
* @brief Event flag to be set on a GAUGE_BATLOW2 interrupt. |
|
315 |
*/ |
|
316 |
#define MODULE_OS_IOEVENTFLAGS_GAUGEBATLOW2 ((eventflags_t)1 << GPIOB_GAUGE_BATLOW2) |
|
317 |
|
|
318 |
/** |
|
319 |
* @brief Event flag to be set on a GAUGE_BATGD2 interrupt. |
|
320 |
*/ |
|
321 |
#define MODULE_OS_IOEVENTFLAGS_GAUGEBATGD2 ((eventflags_t)1 << GPIOB_GAUGE_BATGD2_N) |
|
322 |
|
|
323 |
/** |
|
324 |
* @brief Event flag to be set on a PATH_DC interrupt. |
|
325 |
*/ |
|
326 |
#define MODULE_OS_IOEVENTFLAGS_PATHDC ((eventflags_t)1 << GPIOC_PATH_DC) |
|
327 |
|
|
328 |
/** |
|
329 |
* @brief Event flag to be set on a SYS_SPI_DIR interrupt. |
|
330 |
*/ |
|
331 |
#define MODULE_OS_IOEVENTFLAGS_SYSSPIDIR ((eventflags_t)1 << GPIOC_SYS_SPI_DIR) |
|
332 |
|
|
333 |
/** |
|
334 |
* @brief Event flag to be set on a SYS_SYNC interrupt. |
|
335 |
*/ |
|
336 |
//#define MODULE_OS_IOEVENTFLAGS_SYSSYNC ((eventflags_t)1 << GPIOC_SYS_INT_N) |
|
337 |
|
|
338 |
/** |
|
339 |
* @brief Event flag to be set on a SYS_PD interrupt. |
|
340 |
*/ |
|
341 |
#define MODULE_OS_IOEVENTFLAGS_SYSPD ((eventflags_t)1 << GPIOC_SYS_PD_N) |
|
342 |
|
|
343 |
/** |
|
344 |
* @brief Event flag to be set on a SYS_WARMRST interrupt. |
|
345 |
*/ |
|
346 |
#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST ((eventflags_t)1 << GPIOC_SYS_WARMRST_N) |
|
347 |
|
|
348 |
/** |
|
349 |
* @brief Event flag to be set on a SYS_UART_UP interrupt. |
|
350 |
*/ |
|
351 |
#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP ((eventflags_t)1 << GPIOB_SYS_UART_UP) |
|
352 |
|
|
353 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__) |
|
354 |
/** |
|
355 |
* @brief Shell prompt text. |
|
356 |
*/ |
|
357 |
extern ROMCONST char* moduleShellPrompt; |
|
358 |
#endif |
|
359 |
|
|
360 |
/** |
|
361 |
* @brief Interrupt initialization macro. |
|
362 |
* @note SSSP related interrupt signals are already initialized in 'aos_system.c'. |
|
363 |
*/ |
|
364 |
#define MODULE_INIT_INTERRUPTS() { \ |
|
365 |
/* IR_INT1 */ \ |
|
366 |
palSetPadCallback(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, _intCallback, &moduleGpioIrInt1.gpio->pad); \ |
|
367 |
palEnablePadEvent(moduleGpioIrInt1.gpio->port, moduleGpioIrInt1.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge)); \ |
|
368 |
/* GAUGE_BATLOW2 */ \ |
|
369 |
palSetPadCallback(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, _intCallback, &moduleGpioGaugeBatLow2.gpio->pad); \ |
|
370 |
palEnablePadEvent(moduleGpioGaugeBatLow2.gpio->port, moduleGpioGaugeBatLow2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge)); \ |
|
371 |
/* GAUGE_BATGD2 */ \ |
|
372 |
palSetPadCallback(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, _intCallback, &moduleGpioGaugeBatGd2.gpio->pad); \ |
|
373 |
palEnablePadEvent(moduleGpioGaugeBatGd2.gpio->port, moduleGpioGaugeBatGd2.gpio->pad, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge)); \ |
|
374 |
/* GAUGE_BATLOW1 */ \ |
|
375 |
palSetPadCallback(moduleGpioGaugeBatLow1.gpio->port, moduleGpioGaugeBatLow1.gpio->pad, _intCallback, &moduleGpioGaugeBatLow1.gpio->pad); \ |
Also available in: Unified diff