Skip to content

Commit 6e96bb0

Browse files
committed
[docs] Improve doxypress documentation
1 parent f9bc83c commit 6e96bb0

File tree

237 files changed

+1502
-1497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+1502
-1497
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CMakeLists.txt
3131

3232
# ignore generated code in the example folder
3333
examples/**/modm
34+
examples/**/modm-test
3435
examples/**/artifacts
3536
examples/**/compile_commands.json
3637
examples/**/SConstruct

src/modm/architecture/detect.hpp

Lines changed: 85 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -16,76 +16,81 @@
1616

1717
#ifdef __DOXYGEN__
1818

19-
20-
/// Compiler description
2119
/// @ingroup modm_architecture
20+
/// @{
21+
22+
/// Compiler description string
2223
#define MODM_COMPILER_STRING
2324

24-
/// Possible compilers
25-
/// @ingroup modm_architecture
26-
/// @{
25+
/// Compiling with GCC
2726
#define MODM_COMPILER_GCC
28-
#define MODM_COMPILER_MSVC
29-
/// @}
27+
/// Compiling with GCC on Windows
28+
#define MODM_COMPILER_MINGW
3029

31-
/// Operating system description
32-
/// @ingroup modm_architecture
30+
/// Operating system description string
3331
#define MODM_OS_STRING
3432

35-
/// Possible operating systems
36-
/// @ingroup modm_architecture
37-
/// @{
33+
/// Compiling for a UNIX target
3834
#define MODM_OS_UNIX
35+
/// Compiling for a Linux target
3936
#define MODM_OS_LINUX
37+
/// Compiling for a macOS target
4038
#define MODM_OS_OSX
39+
/// Compiling for a Windows 32-bit target
4140
#define MODM_OS_WIN32
41+
/// Compiling for a Windows 64-bit target
4242
#define MODM_OS_WIN64
43+
/// Compiling for a hosted (non-barebone) target
4344
#define MODM_OS_HOSTED
44-
#define MODM_OS_HOSTED_64
45-
/// @}
45+
/// Compiling for a barebone target without OS
46+
#define MODM_OS_NONE
4647

47-
/// CPU description
48-
/// @ingroup modm_architecture
48+
/// CPU description string
4949
#define MODM_CPU_STRING
5050

51-
/// Possible CPU definitions
52-
/// @ingroup modm_architecture
53-
/// @{
51+
/// Compiling for x86-64 target
52+
#define MODM_CPU_AMD64
53+
/// Compiling for x86 target
54+
#define MODM_CPU_I386
55+
56+
/// Compiling for AVR target
5457
#define MODM_CPU_AVR
55-
#define MODM_CPU_ATXMEGA
58+
/// Compiling for AVR ATmega target
5659
#define MODM_CPU_ATMEGA
60+
/// Compiling for AVR ATtiny target
5761
#define MODM_CPU_ATTINY
5862

63+
/// Compiling for ARM target
5964
#define MODM_CPU_ARM
60-
#define MODM_CPU_ARM7TDMI
65+
/// Compiling for ARM Cortex-M0 or Cortex-M0+ target
6166
#define MODM_CPU_CORTEX_M0
67+
/// Compiling for ARM Cortex-M3 target
6268
#define MODM_CPU_CORTEX_M3
69+
/// Compiling for ARM Cortex-M4 or Cortex-M7 target
6370
#define MODM_CPU_CORTEX_M4
64-
/// @}
71+
/// Compiling for ARM Cortex-M33 target
72+
#define MODM_CPU_CORTEX_M33
73+
/// Compiling for ARM AArch64 target
74+
#define MODM_CPU_AARCH64
6575

66-
/// Memory descriptions
67-
/// @ingroup modm_architecture
68-
/// @{
76+
/// Native memory alignment in bytes
6977
#define MODM_ALIGNMENT
7078

71-
#define MODM_ORDER_BIG_ENDIAN
72-
#define MODM_ORDER_LITTLE_ENDIAN
73-
#define MODM_ORDER_PDP_ENDIAN
74-
75-
#define MODM_BYTE_ORDER
76-
77-
#define MODM_IS_BIG_ENDIAN
79+
/// Compiling for a little endian memory layout
7880
#define MODM_IS_LITTLE_ENDIAN
81+
/// Compiling for a big endian memory layout
82+
#define MODM_IS_BIG_ENDIAN
7983

84+
/// Size of pointer in bytes
8085
#define MODM_SIZEOF_POINTER
86+
8187
/// @}
8288

83-
#else //!__DOXYGEN__
89+
#else // !__DOXYGEN__
8490

85-
// ----------------------------------------------------------------------------
86-
// Determine compilation environment
87-
88-
/**
91+
/* ----------------------------------------------------------------------------
92+
* Determine compilation environment
93+
*
8994
* This relies on the predefined defines of the compiler.
9095
* To display the defines run:
9196
* $your-gcc-compiler -dM -E - < /dev/null | sort | less
@@ -99,83 +104,74 @@
99104
* $arm-none-eabi-g++ -dM -E -mcpu=cortex-m0 -mthumb -D__ARM_LPC1114_301__ -D__ARM_LPC11XX__ - < /dev/null
100105
*/
101106

102-
#if defined __clang__
107+
#ifdef __clang__
103108
# define MODM_COMPILER_STRING "Clang"
104-
# define MODM_COMPILER_CLANG 1
109+
# define MODM_COMPILER_CLANG 1
105110
#elif defined __GNUC__
106-
# define MODM_COMPILER_GCC 1
107-
# if defined __MINGW32__
111+
# define MODM_COMPILER_GCC 1
112+
# ifdef __MINGW32__
108113
# define MODM_COMPILER_STRING "MinGW / MinGW-w64"
109-
# define MODM_COMPILER_MINGW 1
114+
# define MODM_COMPILER_MINGW 1
110115
# else
111116
# define MODM_COMPILER_STRING "Gnu GCC"
112117
# endif
113118
#endif
114119

115-
#if defined _MSC_VER
116-
# define MODM_COMPILER_STRING "Microsoft Visual C++"
117-
# define MODM_COMPILER_MSVC 1
118-
#endif
119-
120-
#if !defined MODM_COMPILER_STRING
121-
# define MODM_COMPILER_STRING "Unknown compiler"
120+
#ifndef MODM_COMPILER_STRING
121+
# define MODM_COMPILER_STRING "Unknown compiler"
122122
# warning "Couldn't determine the used compiler! Please add it to <modm/architecture/detect.hpp>"
123123
#endif
124124

125125
// ----------------------------------------------------------------------------
126126
// Determine target operating system
127127

128128
#if defined linux || defined __linux__
129-
# define MODM_OS_HOSTED 1
130-
# define MODM_OS_LINUX 1
131-
# define MODM_OS_STRING "Linux"
129+
# define MODM_OS_HOSTED 1
130+
# define MODM_OS_LINUX 1
131+
# define MODM_OS_STRING "Linux"
132132
#endif
133133

134134
#if (defined __MWERKS__ && defined __powerc && !defined macintosh) || defined __APPLE_CC__ || defined macosx
135-
# define MODM_OS_HOSTED 1
136-
# define MODM_OS_OSX 1
137-
# define MODM_OS_STRING "MacOS X"
135+
# define MODM_OS_HOSTED 1
136+
# define MODM_OS_OSX 1
137+
# define MODM_OS_STRING "MacOS X"
138138
#endif
139139

140-
#if defined __unix__
141-
# define MODM_OS_HOSTED 1
142-
# define MODM_OS_UNIX 1
143-
# if !defined MODM_OS_STRING
144-
# define MODM_OS_STRING "Unix-like(generic)"
140+
#ifdef __unix__
141+
# define MODM_OS_HOSTED 1
142+
# define MODM_OS_UNIX 1
143+
# ifndef MODM_OS_STRING
144+
# define MODM_OS_STRING "Unix-like(generic)"
145145
# endif
146146
#endif
147147

148148
#if defined _WIN32 || defined WIN32 || defined __NT__ || defined __WIN32__
149-
# define MODM_OS_HOSTED 1
150-
# define MODM_OS_WIN32 1
151-
# if defined _WIN64
152-
# define MODM_OS_WIN64 1
153-
# define MODM_OS_STRING "Win64"
149+
# define MODM_OS_HOSTED 1
150+
# define MODM_OS_WIN32 1
151+
# ifdef _WIN64
152+
# define MODM_OS_WIN64 1
153+
# define MODM_OS_STRING "Win64"
154154
# else
155-
# if !defined MODM_OS_STRING
155+
# ifndef MODM_OS_STRING
156156
# define MODM_OS_STRING "Win32"
157157
# endif
158158
# endif
159159
#endif
160160

161-
#define MODM_ORDER_BIG_ENDIAN 4321
162-
#define MODM_ORDER_LITTLE_ENDIAN 1234
163-
#define MODM_ORDER_PDP_ENDIAN 3412
164-
165161
// If we did not detect any of Linux, OS X or Windows
166-
#if !defined(MODM_OS_HOSTED)
162+
#ifndef MODM_OS_HOSTED
167163
# define MODM_OS_NONE 1
168164
#endif
169165

170166
// ----------------------------------------------------------------------------
171167
// Determine CPU type
172168

173-
#if defined __AVR__
174-
# define MODM_CPU_AVR 1
169+
#ifdef __AVR__
170+
# define MODM_CPU_AVR 1
175171
# define MODM_ALIGNMENT 1
176-
# if defined __AVR_XMEGA__
172+
# ifdef __AVR_XMEGA__
177173
# define MODM_CPU_ATXMEGA 1
178-
# define MODM_CPU_STRING "Atmel XMEGA"
174+
# define MODM_CPU_STRING "Atmel XMEGA"
179175
# else
180176
// see http://www.nongnu.org/avr-libc/user-manual/using_tools.html
181177
# if __AVR_ARCH__ == 2 || __AVR_ARCH__ == 25 || __AVR_ARCH__ == 1
@@ -190,23 +186,20 @@
190186

191187
#if defined __X86__ || defined __i386__ || defined i386 || defined _M_IX86 || defined __386__ || defined __x86_64__ || defined _M_X64
192188
# if defined __x86_64__ || defined _M_X64
193-
# define MODM_CPU_AMD64 1
194-
# define MODM_CPU_STRING "AMD x86-64"
189+
# define MODM_CPU_AMD64 1
190+
# define MODM_CPU_STRING "AMD x86-64"
195191
# define MODM_ALIGNMENT 8
196192
# else
197-
# define MODM_CPU_I386 1
198-
# define MODM_CPU_STRING "Intel 386+"
193+
# define MODM_CPU_I386 1
194+
# define MODM_CPU_STRING "Intel 386+"
199195
# define MODM_ALIGNMENT 4
200196
# endif
201197
#endif
202198

203199
#if defined __arm__ || defined __aarch64__
204-
# define MODM_CPU_ARM 1
200+
# define MODM_CPU_ARM 1
205201
# define MODM_ALIGNMENT 4
206-
# if defined __ARM_ARCH_4T__
207-
# define MODM_CPU_ARM7TDMI 1
208-
# define MODM_CPU_STRING "ARM7TDMI"
209-
# elif defined __ARM_ARCH_6SM__ || defined __ARM_ARCH_6M__
202+
# if defined __ARM_ARCH_6SM__ || defined __ARM_ARCH_6M__
210203
# define MODM_CPU_CORTEX_M0 1
211204
# define MODM_CPU_STRING "ARM Cortex-M0"
212205
# elif defined __ARM_ARCH_7M__
@@ -218,52 +211,29 @@
218211
# elif defined __ARM_ARCH_8M_MAIN__
219212
# define MODM_CPU_CORTEX_M33 1
220213
# define MODM_CPU_STRING "ARM Cortex-M33"
221-
# elif defined __ARM_ARCH_6__
222-
# define MODM_CPU_CORTEX_A6 1
223-
# define MODM_CPU_STRING "ARM Cortex-A6"
224-
# elif defined __ARM_ARCH_7A__
225-
# define MODM_CPU_CORTEX_A7 1
226-
# define MODM_CPU_STRING "ARM Cortex-A7"
227214
# elif defined __ARM_ARCH_ISA_A64
228-
# define MODM_CPU_AARCH64 1
215+
# define MODM_CPU_AARCH64 1
229216
# define MODM_CPU_STRING "ARM AArch64"
230217
# endif
231218
#endif
232219

233-
#if !defined MODM_CPU_STRING
220+
#ifndef MODM_CPU_STRING
234221
# error "Couldn't determine target CPU!"
235-
# define MODM_CPU_STRING "Unknown"
222+
# define MODM_CPU_STRING "Unknown"
236223
#endif
237224

238225
// ----------------------------------------------------------------------------
239226
// Provide some additional information
240227

241-
#if defined __SIZEOF_POINTER__
242-
# define MODM_SIZEOF_POINTER __SIZEOF_POINTER__
228+
#ifdef __SIZEOF_POINTER__
229+
# define MODM_SIZEOF_POINTER __SIZEOF_POINTER__
243230
#else
244-
# if defined(MODM_OS_HOSTED_64)
245-
# define MODM_SIZEOF_POINTER 8
246-
# elif defined(MODM_OS_HOSTED_32)
247-
# define MODM_SIZEOF_POINTER 4
248-
# endif
249-
#endif
250-
251-
#if !defined MODM_SIZEOF_POINTER
252231
# error "MODM_SIZEOF_POINTER not defined! Please provide a suitable definition."
253232
#endif
254233

234+
#define MODM_IS_LITTLE_ENDIAN (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
235+
#define MODM_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
255236

256-
#if defined __BYTE_ORDER__
257-
# define MODM_BYTE_ORDER __BYTE_ORDER__
258-
#endif
259-
260-
#if !defined MODM_BYTE_ORDER
261-
# error "MODM_BYTE_ORDER not defined! Please provide a suitable definition."
262-
#endif
263-
264-
#define MODM_IS_BIG_ENDIAN (MODM_BYTE_ORDER == MODM_ORDER_BIG_ENDIAN)
265-
#define MODM_IS_LITTLE_ENDIAN (MODM_BYTE_ORDER == MODM_ORDER_LITTLE_ENDIAN)
266-
267-
#define MODM_HAS_IOSTREAM __has_include(<modm/io/iostream.hpp>)
237+
#define MODM_HAS_IOSTREAM __has_include(<modm/io/iostream.hpp>)
268238

269239
#endif // !__DOXYGEN__

src/modm/architecture/interface/accessor_flash.hpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,22 @@
2121

2222
#ifdef __DOXYGEN__
2323

24-
/// Define a flash variable
2524
/// @ingroup modm_architecture_accessor
26-
#define FLASH_STORAGE(var)
25+
/// @{
2726

27+
/// Define a flash variable
28+
#define FLASH_STORAGE(var)
2829
/// Define a flash variable with external linkage
29-
/// @ingroup modm_architecture_accessor
3030
#define EXTERN_FLASH_STORAGE(var)
31-
3231
/// Define a flash string
33-
/// @ingroup modm_architecture_accessor
3432
#define FLASH_STORAGE_STRING(s)
35-
3633
/// Declare a flash string with external linkage
37-
/// @ingroup modm_architecture_accessor
3834
#define EXTERN_FLASH_STORAGE_STRING(s)
39-
4035
/// Declare a flash string inline
41-
/// @ingroup modm_architecture_accessor
4236
#define IFSS(s) ((const char *)(s))
4337

38+
/// @}
39+
4440
#else // !__DOXYGEN__
4541

4642
#include <modm/platform/core/flash_reader_impl.hpp>

src/modm/architecture/interface/assert.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ typedef struct modm_packed
8080

8181
#define _modm_assert_get_macro(_1,_2,_3,_4,_modm_assertN,...) _modm_assertN
8282

83-
8483
// modm_assert* definitions
8584
#define modm_assert(...) \
8685
_modm_assert_get_macro(__VA_ARGS__, _modm_assert5, _modm_assert4)(0x04, __VA_ARGS__)
@@ -109,3 +108,4 @@ typedef struct modm_packed
109108
modm_extern_c void
110109
modm_assert_report(_modm_assertion_info *info);
111110
/// @endcond
111+
/// @endcond

0 commit comments

Comments
 (0)