TI 官方库的注释风格挺实用的

大笑一目了然, 蛮好看的, 那就拿来自己用试试. 

################################################################################################################

/** ===========================================================================
 *   @func CSL_spiOpen
 *
 *   @desc
 *        This function populates the peripheral data object for the instance
 *        and returns a handle to the instance.
 *        The open call sets up the data structures for the particular instance
 *        of SPI device. The device can be re-opened anytime after it has been
 *        normally closed if so required. SPI Hardware setup will be performed
 *        at the end of the open call only if the HwSetup Pointer supplied was
 *        non-NULL. The handle returned by this call is input as an essential
 *        argument for rest of the APIs described for this module.
 *
 *   @arg pSpiObj
 *        Pointer to the SPI instance object
 *
 *   @arg spiNum
 *        Instance of the SPI to be opened.
 *
 *   @arg pSpiParam
 *        Pointer to module specific parameters
 *
 *   @arg pStatus
 *        pointer for returning status of the function call
 *
 *   @ret CSL_SpiHandle
 *        Valid SPI instance handle will be returned if status value is
 *        equal to CSL_SOK.
 *
 *   @eg
 *        CSL_Status        status;
 *        CSL_SpiObj        spiObj;
 *        CSL_SpiHandle     hSpi;
 *
 *        hSpi = CSL_spiOpen (&spiObj,
 *                            CSL_SPI_0,
 *                            NULL,
 *                            &status
 *                            );
 *
 * ===========================================================================
 */
/** @brief opens if possible the instance of SPI requested */
CSL_SpiHandle CSL_spiOpen(
	/** pointer to the object that holds reference to the instance of SPI
	* requested after the call */
	CSL_SpiObj                            *hSpiObj,
	/** instance of SPI to which a handle is requested */
	CSL_InstNum                           spiNum,
	/** specifies if SPI should be opened with excusive or share access to
	* the associate pins */
	CSL_SpiParam                          *pSpiParam,
	/** This returns the status (success/errors) of the call */
	CSL_Status                            *status
);


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值