Skip to content

Commit a0c55a4

Browse files
unicornxRbb666
authored andcommitted
doxygen: align code for kenerl object doc
The code formatting in the Object Management Markdown document is misaligned. This issue can be fixed by replacing tabs with spaces. Signed-off-by: Chen Wang <[email protected]>
1 parent 8bf15b1 commit a0c55a4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

documentation/3.kernel/object/object.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ static rt_uint8_t thread1_stack[512];
1515
/* Thread 1 entry */
1616
void thread1_entry(void* parameter)
1717
{
18-
int i;
18+
int i;
1919

2020
while (1)
2121
{
22-
for (i = 0; i < 10; i ++)
23-
{
24-
rt_kprintf("%d\n", i);
22+
for (i = 0; i < 10; i ++)
23+
{
24+
rt_kprintf("%d\n", i);
2525

26-
/* Delay 100ms */
27-
rt_thread_mdelay(100);
28-
}
26+
/* Delay 100ms */
27+
rt_thread_mdelay(100);
28+
}
2929
}
3030
}
3131

@@ -35,10 +35,10 @@ void thread2_entry(void* parameter)
3535
int count = 0;
3636
while (1)
3737
{
38-
rt_kprintf("Thread2 count:%d\n", ++count);
38+
rt_kprintf("Thread2 count:%d\n", ++count);
3939

40-
/* Delay 50ms */
41-
rt_thread_mdelay(50);
40+
/* Delay 50ms */
41+
rt_thread_mdelay(50);
4242
}
4343
}
4444

@@ -54,10 +54,10 @@ int thread_sample_init()
5454
* Priority is 200 and time slice is 10 OS Tick
5555
*/
5656
result = rt_thread_init(&thread1,
57-
"thread1",
58-
thread1_entry, RT_NULL,
59-
&thread1_stack[0], sizeof(thread1_stack),
60-
200, 10);
57+
"thread1",
58+
thread1_entry, RT_NULL,
59+
&thread1_stack[0], sizeof(thread1_stack),
60+
200, 10);
6161

6262
/* Start thread */
6363
if (result == RT_EOK) rt_thread_startup(&thread1);
@@ -67,8 +67,8 @@ int thread_sample_init()
6767
* Stack space is 512, priority is 250, and time slice is 25 OS Tick
6868
*/
6969
thread2_ptr = rt_thread_create("thread2",
70-
thread2_entry, RT_NULL,
71-
512, 250, 25);
70+
thread2_entry, RT_NULL,
71+
512, 250, 25);
7272

7373
/* Start thread */
7474
if (thread2_ptr != RT_NULL) rt_thread_startup(thread2_ptr);
@@ -157,8 +157,8 @@ An uninitialized static object must be initialized before it can be used. The in
157157

158158
```c
159159
void rt_object_init(struct rt_object* object ,
160-
enum rt_object_class_type type ,
161-
const char* name)
160+
enum rt_object_class_type type ,
161+
const char* name)
162162
```
163163
164164
When this function is called to initialize the object, the system will place the object into the object container for management, that is, initialize some parameters of the object, and then insert the object node into the object linked list of the object container.

0 commit comments

Comments
 (0)