summaryrefslogtreecommitdiff
path: root/src/components.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-09-14 22:33:51 +0800
committerGitHub <[email protected]>2021-09-14 22:33:51 +0800
commitb2c64b797774b394184b2aaef3fbc1fa50a38f5a (patch)
tree0948643a09b4ad6eeb91ef4c1bda39146051c8fd /src/components.c
parentf76a192fb38470954f25db5be598351258a7aeb4 (diff)
parent6cb093aa272a0b1ef908cbd8e103cbd94120b3c6 (diff)
Merge pull request #5039 from Guozhanxin/kernel_comment
Improve the Kernel comment
Diffstat (limited to 'src/components.c')
-rw-r--r--src/components.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/components.c b/src/components.c
index e156b783e4..9433b7457c 100644
--- a/src/components.c
+++ b/src/components.c
@@ -78,7 +78,9 @@ static int rti_end(void)
INIT_EXPORT(rti_end, "6.end");
/**
- * RT-Thread Components Initialization for board
+ * @brief Onboard components initialization. In this function, the board-level
+ * initialization function will be called to complete the initialization
+ * of the on-board peripherals.
*/
void rt_components_board_init(void)
{
@@ -102,7 +104,7 @@ void rt_components_board_init(void)
}
/**
- * RT-Thread Components Initialization
+ * @brief RT-Thread Components Initialization.
*/
void rt_components_init(void)
{
@@ -169,7 +171,11 @@ static rt_uint8_t main_stack[RT_MAIN_THREAD_STACK_SIZE];
struct rt_thread main_thread;
#endif /* RT_USING_HEAP */
-/* the system main thread */
+/**
+ * @brief The system main thread. In this thread will call the rt_components_init()
+ * for initialization of RT-Thread Components and call the user's programming
+ * entry main().
+ */
void main_thread_entry(void *parameter)
{
extern int main(void);
@@ -193,6 +199,10 @@ void main_thread_entry(void *parameter)
#endif
}
+/**
+ * @brief This function will create and start the main thread, but this thread
+ * will not run until the scheduler starts.
+ */
void rt_application_init(void)
{
rt_thread_t tid;
@@ -216,6 +226,10 @@ void rt_application_init(void)
rt_thread_startup(tid);
}
+/**
+ * @brief This function will call all levels of initialization functions to complete
+ * the initialization of the system, and finally start the scheduler.
+ */
int rtthread_startup(void)
{
rt_hw_interrupt_disable();