Skip to content

Commit ace7fdb

Browse files
authored
doxygen: fixed build warning for RT_CAN_FILTER_ITEM_INIT (#10758)
The names and number of macro parameters in doxygen comments must match the actual macro definition; otherwise, a warning will be generated. Our goal is to eliminate all warnings. Signed-off-by: Chen Wang <[email protected]>
1 parent 98340c1 commit ace7fdb

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

components/drivers/include/drivers/dev_can.h

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,19 @@ struct rt_can_filter_item
276276
#endif /*RT_CAN_USING_HDR*/
277277
};
278278

279+
#ifdef RT_CAN_USING_HDR
279280
/**
280281
* @def RT_CAN_FILTER_ITEM_INIT
281282
* @brief A helper macro to initialize a `rt_can_filter_item` structure for Mask Mode.
282283
*
283-
* @param[in] _id The CAN ID for the filter.
284-
* @param[in] _ide Identifier type (0 for Standard, 1 for Extended).
285-
* @param[in] _rtr Frame type (0 for Data, 1 for Remote).
286-
* @param[in] _mode Filter mode (0 for Mask, 1 for List).
287-
* @param[in] _mask The mask to be applied.
288-
* @param[in] _ind Optional callback function (can be RT_NULL).
289-
* @param[in] _args Optional arguments for the callback (can be RT_NULL).
284+
* @param[in] id The CAN ID for the filter.
285+
* @param[in] ide Identifier type (0 for Standard, 1 for Extended).
286+
* @param[in] rtr Frame type (0 for Data, 1 for Remote).
287+
* @param[in] mode Filter mode (0 for Mask, 1 for List).
288+
* @param[in] mask The mask to be applied.
289+
* @param[in] ind Optional callback function (can be RT_NULL).
290+
* @param[in] args Optional arguments for the callback (can be RT_NULL).
290291
*/
291-
#ifdef RT_CAN_USING_HDR
292292
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask,ind,args) \
293293
{(id), (ide), (rtr), (mode),(mask), -1, CAN_RX_FIFO0,(ind), (args)}
294294
#define RT_CAN_FILTER_STD_INIT(id,ind,args) \
@@ -304,6 +304,16 @@ struct rt_can_filter_item
304304
#define RT_CAN_EXT_RMT_DATA_FILTER_INIT(id,ind,args) \
305305
RT_CAN_FILTER_ITEM_INIT(id,1,0,1,0xFFFFFFFF,ind,args)
306306
#else
307+
/**
308+
* @def RT_CAN_FILTER_ITEM_INIT
309+
* @brief A helper macro to initialize a `rt_can_filter_item` structure for Mask Mode.
310+
*
311+
* @param[in] id The CAN ID for the filter.
312+
* @param[in] ide Identifier type (0 for Standard, 1 for Extended).
313+
* @param[in] rtr Frame type (0 for Data, 1 for Remote).
314+
* @param[in] mode Filter mode (0 for Mask, 1 for List).
315+
* @param[in] mask The mask to be applied.
316+
*/
307317
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask) \
308318
{(id), (ide), (rtr), (mode), (mask), -1, CAN_RX_FIFO0 }
309319
#define RT_CAN_FILTER_STD_INIT(id) \

0 commit comments

Comments
 (0)