• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テスト用のあれこれ共用フォルダ


Commit MetaInfo

Revision275b579445324f4d5465d4909bff9ee62b8729c5 (tree)
Time2019-02-06 08:36:36
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Edit Doxygen comment

murasaki_platform.cpp is movied to hpp

Change Summary

Incremental Difference

--- a/stm32_experimental/murasaki_sample/murasaki/template/murasaki_platform.cpp
+++ b/stm32_experimental/murasaki_sample/murasaki/template/murasaki_platform.cpp
@@ -15,6 +15,8 @@
1515
1616 // Include the prototype of functions of this file.
1717
18+/* -------------------- PLATFORM Type and classes -------------------------- */
19+
1820 /* -------------------- PLATFORM VARIABLES-------------------------- */
1921
2022 // Essential definition.
@@ -45,25 +47,6 @@ extern UART_HandleTypeDef huart3;
4547
4648 void TaskBodyFunction(const void* ptr);
4749
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- */
6750 void InitPlatform()
6851 {
6952 // UART device setting for console interface.
@@ -103,18 +86,6 @@ void InitPlatform()
10386
10487 }
10588
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- */
11889 void ExecPlatform()
11990 {
12091 // counter for the demonstration.
@@ -477,63 +448,18 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_P)
477448
478449 /* ------------------ ASSERTION AND ERROR -------------------------- */
479450
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- */
498451 void CustomAssertFailed(uint8_t* file, uint32_t line)
499452 {
500453 murasaki::debugger->Printf("Wrong parameters value: file %s on line %d\r\n",
501454 file, line);
502455 }
503456
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- */
531457 void CustomDefaultHandler() {
532458 // Call debugger's post mortem processing. Never return again.
533459 murasaki::debugger->DoPostMortem();
534460 }
535461
536-
462+/* ------------------ User Function -------------------------- */
537463 // Task body of the murasaki::platform.task1
538464 void TaskBodyFunction(const void* ptr)
539465 {
--- a/stm32_experimental/murasaki_sample/murasaki/template/murasaki_platform.hpp
+++ b/stm32_experimental/murasaki_sample/murasaki/template/murasaki_platform.hpp
@@ -17,11 +17,88 @@ extern "C" {
1717
1818 #include <stdint.h>
1919 // 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+ */
2039 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+
2154 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+
2374 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+ */
25102 void CustomDefaultHandler();
26103 #ifdef __cplusplus
27104 }