|
@@ -78,7 +78,7 @@ static int rti_end(void)
|
|
INIT_EXPORT(rti_end, "6.end");
|
|
INIT_EXPORT(rti_end, "6.end");
|
|
|
|
|
|
/**
|
|
/**
|
|
- * RT-Thread Components Initialization for board
|
|
|
|
|
|
+ * @brief RT-Thread Components Initialization for board.
|
|
*/
|
|
*/
|
|
void rt_components_board_init(void)
|
|
void rt_components_board_init(void)
|
|
{
|
|
{
|
|
@@ -102,7 +102,7 @@ void rt_components_board_init(void)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * RT-Thread Components Initialization
|
|
|
|
|
|
+ * @brief RT-Thread Components Initialization.
|
|
*/
|
|
*/
|
|
void rt_components_init(void)
|
|
void rt_components_init(void)
|
|
{
|
|
{
|
|
@@ -169,7 +169,11 @@ static rt_uint8_t main_stack[RT_MAIN_THREAD_STACK_SIZE];
|
|
struct rt_thread main_thread;
|
|
struct rt_thread main_thread;
|
|
#endif /* RT_USING_HEAP */
|
|
#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)
|
|
void main_thread_entry(void *parameter)
|
|
{
|
|
{
|
|
extern int main(void);
|
|
extern int main(void);
|
|
@@ -193,6 +197,10 @@ void main_thread_entry(void *parameter)
|
|
#endif
|
|
#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)
|
|
void rt_application_init(void)
|
|
{
|
|
{
|
|
rt_thread_t tid;
|
|
rt_thread_t tid;
|
|
@@ -216,6 +224,11 @@ void rt_application_init(void)
|
|
rt_thread_startup(tid);
|
|
rt_thread_startup(tid);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @brief RT-Thread startup function. 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)
|
|
int rtthread_startup(void)
|
|
{
|
|
{
|
|
rt_hw_interrupt_disable();
|
|
rt_hw_interrupt_disable();
|