Skip to content

Commit e0d49f0

Browse files
committed
doxygen: lwp: add doxygen comment for lwp_dbg.h
So far, lwp component has not enough doxygen comment and community also has need. Solution: Change Doxyfile for including component/lwp folder and add doxyzen comment for lwp_dbg.h. Signed-off-by: 1078249029 <[email protected]>
1 parent ab1f438 commit e0d49f0

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

components/lwp/lwp_dbg.h

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
2-
* Copyright (c) 2006-2023, RT-Thread Development Team
2+
* Copyright (c) 2006-2025 RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
66
* Change Logs:
77
* Date Author Notes
88
* 2023-07-11 RT-Thread first version
9+
* 2025-01-16 wumingzi add doxyzen comment
910
*/
1011

1112
#ifndef __LWP_DBG_H__
@@ -15,15 +16,75 @@
1516
#include <rthw.h>
1617
#include <lwp.h>
1718

19+
/**
20+
* addtogroup KernelService
21+
* @defgroup lwp lwp
22+
* @brief lwp api
23+
* @ingroup KernelService
24+
* @addtogroup lwp
25+
*@{
26+
*/
27+
28+
/**
29+
* @brief Get lwp debug state
30+
* @return int lwp debug state code
31+
*/
1832
int dbg_thread_in_debug(void);
33+
34+
/**
35+
* @brief Register dbg_ops to struct dbg_ops_t
36+
* @param dbg_ops Pointer to dbg_ops_t that contains function pointers for various debugging operations.
37+
*/
1938
void dbg_register(struct dbg_ops_t *dbg_ops);
39+
40+
/**
41+
* @brief Get lwp instructure state
42+
* @return Return the architecture number
43+
*/
2044
uint32_t dbg_get_ins(void);
45+
46+
/**
47+
* @brief Enable step debug feature
48+
*/
2149
void dbg_activate_step(void);
50+
51+
/**
52+
* @brief Disable step debug feature
53+
*/
2254
void dbg_deactivate_step(void);
55+
56+
/**
57+
* @brief Check event for related instruction by exception state register
58+
* @param regs Pointer to exception stack with type struct rt_hw_exp_stack *
59+
* @param esr Address of exception state register
60+
* @return Return the debug event number
61+
*/
2362
int dbg_check_event(struct rt_hw_exp_stack *regs, unsigned long esr);
63+
64+
/**
65+
* @brief Get gdb server channel and prepared by rt_channel_t
66+
* @return Return a Pointer to rt_channel_t
67+
*/
2468
rt_channel_t gdb_server_channel(void);
69+
70+
/**
71+
* @brief Get debug step type
72+
* @return Return the debug step type
73+
*/
2574
int dbg_step_type(void);
75+
76+
/**
77+
* @brief Start debug attach request
78+
* @param pc Pointer to programe counter
79+
*/
2680
void dbg_attach_req(void *pc);
81+
82+
/**
83+
* @brief Suspend debug attach request
84+
* @return Return result of suspend operation and 0 is failed.
85+
*/
2786
int dbg_check_suspend(void);
2887

29-
#endif /* __LWP_DBG_H__ */
88+
/*! @}*/
89+
90+
#endif /* __LWP_DBG_H__ */

documentation/doxygen/Doxyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,8 @@ INPUT = ../../src \
870870
../../components/finsh \
871871
../../components/drivers/include/drivers \
872872
../../components/dfs/dfs_v2/src \
873-
../../components/dfs/dfs_v2/include
873+
../../components/dfs/dfs_v2/include \
874+
../../components/lwp \
874875

875876
# This tag can be used to specify the character encoding of the source files
876877
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

0 commit comments

Comments
 (0)