テスト用のあれこれ共用フォルダ
Revision | 275b579445324f4d5465d4909bff9ee62b8729c5 (tree) |
---|---|
Time | 2019-02-06 08:36:36 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Edit Doxygen comment
murasaki_platform.cpp is movied to hpp
@@ -15,6 +15,8 @@ | ||
15 | 15 | |
16 | 16 | // Include the prototype of functions of this file. |
17 | 17 | |
18 | +/* -------------------- PLATFORM Type and classes -------------------------- */ | |
19 | + | |
18 | 20 | /* -------------------- PLATFORM VARIABLES-------------------------- */ |
19 | 21 | |
20 | 22 | // Essential definition. |
@@ -45,25 +47,6 @@ extern UART_HandleTypeDef huart3; | ||
45 | 47 | |
46 | 48 | void TaskBodyFunction(const void* ptr); |
47 | 49 | |
48 | -/** | |
49 | - * @brief Initialize the platform variables. | |
50 | - * @ingroup MURASAKI_PLATFORM_GROUP | |
51 | - * @details | |
52 | - * The murasaki::platform variable is an interface between the application program and HAL / RTOS. | |
53 | - * To use it correctly, the initialization is neede before any activity of murasaki client. | |
54 | - * | |
55 | - * @code | |
56 | - * void StartDefaultTask(void const * argument) | |
57 | - * { | |
58 | - * InitPlatform(); | |
59 | - * ExecPlatform(); | |
60 | - * } | |
61 | - * @endcode | |
62 | - * | |
63 | - * This function have to be invoked from the StartDefaultTask() of the main.c only once | |
64 | - * to initialize the platform varaiable. | |
65 | - * | |
66 | - */ | |
67 | 50 | void InitPlatform() |
68 | 51 | { |
69 | 52 | // UART device setting for console interface. |
@@ -103,18 +86,6 @@ void InitPlatform() | ||
103 | 86 | |
104 | 87 | } |
105 | 88 | |
106 | -/** | |
107 | - * @brief The body of the real application. | |
108 | - * @ingroup MURASAKI_PLATFORM_GROUP | |
109 | - * @details | |
110 | - * The body function of the murasaki application. Usually this function is called from | |
111 | - * the StartDefaultTask() of the main.c. | |
112 | - * | |
113 | - * This function is invoked only once, and never return. See @ref InitPlatform() as calling sample. | |
114 | - * | |
115 | - * By default, it toggles LED as sample program. | |
116 | - * Inside this function can be customized freely. | |
117 | - */ | |
118 | 89 | void ExecPlatform() |
119 | 90 | { |
120 | 91 | // counter for the demonstration. |
@@ -477,63 +448,18 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_P) | ||
477 | 448 | |
478 | 449 | /* ------------------ ASSERTION AND ERROR -------------------------- */ |
479 | 450 | |
480 | -/** | |
481 | - * @brief Hook for the assert_failure() in main.c | |
482 | - * @ingroup MURASAKI_PLATFORM_GROUP | |
483 | - * @param file Name of the source file where assertion happen | |
484 | - * @param line Number of the line where assertion happen | |
485 | - * @details | |
486 | - * This routine provides a custom hook for the assertion inside STM32 HAL. | |
487 | - * All assertion raised in HAL will be redirected here. | |
488 | - * | |
489 | - * @code | |
490 | - * void assert_failed(uint8_t* file, uint32_t line) | |
491 | - * { | |
492 | - * CustomAssertFailed(file, line); | |
493 | - * } | |
494 | - * @endcode | |
495 | - * By default, this routine output a message with location informaiton | |
496 | - * to the debugger console. | |
497 | - */ | |
498 | 451 | void CustomAssertFailed(uint8_t* file, uint32_t line) |
499 | 452 | { |
500 | 453 | murasaki::debugger->Printf("Wrong parameters value: file %s on line %d\r\n", |
501 | 454 | file, line); |
502 | 455 | } |
503 | 456 | |
504 | -/** | |
505 | - * @brief Hook for the default exception handler. Never return. | |
506 | - * @ingroup MURASAKI_PLATFORM_GROUP | |
507 | - * @details | |
508 | - * This routine is invoked from the default handler of the start up file. | |
509 | - * The modification to the startup file is user's responsibility. | |
510 | - * | |
511 | - * For example, the start up code for the Nucleo-L152RE is startup_stml152xe.s. | |
512 | - * This file is generated by CubeMX. This file has default handler as like this: | |
513 | - * | |
514 | - * @code | |
515 | - * .section .text.Default_Handler,"ax",%progbits | |
516 | - * Default_Handler: | |
517 | - * Infinite_Loop: | |
518 | - * b Infinite_Loop | |
519 | - * @endcode | |
520 | - * | |
521 | - * This code can be modified to call CustomDefaultHanler as like this : | |
522 | - * @code | |
523 | - * .global CustomDefaultHandler | |
524 | - * .section .text.Default_Handler,"ax",%progbits | |
525 | - * Default_Handler: | |
526 | - * bl CustomDefaultHandler | |
527 | - * Infinite_Loop: | |
528 | - * b Infinite_Loop | |
529 | - * @endcode | |
530 | - */ | |
531 | 457 | void CustomDefaultHandler() { |
532 | 458 | // Call debugger's post mortem processing. Never return again. |
533 | 459 | murasaki::debugger->DoPostMortem(); |
534 | 460 | } |
535 | 461 | |
536 | - | |
462 | +/* ------------------ User Function -------------------------- */ | |
537 | 463 | // Task body of the murasaki::platform.task1 |
538 | 464 | void TaskBodyFunction(const void* ptr) |
539 | 465 | { |
@@ -17,11 +17,88 @@ extern "C" { | ||
17 | 17 | |
18 | 18 | #include <stdint.h> |
19 | 19 | // Murasaki platform control |
20 | +/** | |
21 | + * @brief Initialize the platform variables. | |
22 | + * @ingroup MURASAKI_PLATFORM_GROUP | |
23 | + * @details | |
24 | + * The murasaki::platform variable is an interface between the application program and HAL / RTOS. | |
25 | + * To use it correctly, the initialization is needed before any activity of murasaki client. | |
26 | + * | |
27 | + * @code | |
28 | + * void StartDefaultTask(void const * argument) | |
29 | + * { | |
30 | + * InitPlatform(); | |
31 | + * ExecPlatform(); | |
32 | + * } | |
33 | + * @endcode | |
34 | + * | |
35 | + * This function have to be invoked from the StartDefaultTask() of the main.c only once | |
36 | + * to initialize the platform varaiable. | |
37 | + * | |
38 | + */ | |
20 | 39 | void InitPlatform(); |
40 | + | |
41 | +/** | |
42 | + * @brief The body of the real application. | |
43 | + * @ingroup MURASAKI_PLATFORM_GROUP | |
44 | + * @details | |
45 | + * The body function of the murasaki application. Usually this function is called from | |
46 | + * the StartDefaultTask() of the main.c. | |
47 | + * | |
48 | + * This function is invoked only once, and never return. See @ref InitPlatform() as calling sample. | |
49 | + * | |
50 | + * By default, it toggles LED as sample program. | |
51 | + * Inside this function can be customized freely. | |
52 | + */ | |
53 | + | |
21 | 54 | void ExecPlatform(); |
22 | -// For the STM32 HAL assertion_failed(); | |
55 | +/** | |
56 | + * @brief Hook for the assert_failure() in main.c | |
57 | + * @ingroup MURASAKI_PLATFORM_GROUP | |
58 | + * @param file Name of the source file where assertion happen | |
59 | + * @param line Number of the line where assertion happen | |
60 | + * @details | |
61 | + * This routine provides a custom hook for the assertion inside STM32 HAL. | |
62 | + * All assertion raised in HAL will be redirected here. | |
63 | + * | |
64 | + * @code | |
65 | + * void assert_failed(uint8_t* file, uint32_t line) | |
66 | + * { | |
67 | + * CustomAssertFailed(file, line); | |
68 | + * } | |
69 | + * @endcode | |
70 | + * By default, this routine output a message with location informaiton | |
71 | + * to the debugger console. | |
72 | + */ | |
73 | + | |
23 | 74 | void CustomAssertFailed(uint8_t* file, uint32_t line); |
24 | -// For the hook of the default exception handler. | |
75 | +/** | |
76 | + * @brief Hook for the default exception handler. Never return. | |
77 | + * @ingroup MURASAKI_PLATFORM_GROUP | |
78 | + * @details | |
79 | + * This routine is invoked from the default handler of the start up file. | |
80 | + * The modification to the startup file is user's responsibility. | |
81 | + * | |
82 | + * For example, the start up code for the Nucleo-L152RE is startup_stml152xe.s. | |
83 | + * This file is generated by CubeMX. This file has default handler as like this: | |
84 | + * | |
85 | + * @code | |
86 | + * .section .text.Default_Handler,"ax",%progbits | |
87 | + * Default_Handler: | |
88 | + * Infinite_Loop: | |
89 | + * b Infinite_Loop | |
90 | + * @endcode | |
91 | + * | |
92 | + * This code can be modified to call CustomDefaultHanler as like this : | |
93 | + * @code | |
94 | + * .global CustomDefaultHandler | |
95 | + * .section .text.Default_Handler,"ax",%progbits | |
96 | + * Default_Handler: | |
97 | + * bl CustomDefaultHandler | |
98 | + * Infinite_Loop: | |
99 | + * b Infinite_Loop | |
100 | + * @endcode | |
101 | + */ | |
25 | 102 | void CustomDefaultHandler(); |
26 | 103 | #ifdef __cplusplus |
27 | 104 | } |