Skip to content

Commit 221c07c

Browse files
committed
Edited more comments
1 parent ad442dc commit 221c07c

2 files changed

Lines changed: 5 additions & 33 deletions

File tree

include/core/io/CANopen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace core::io {
2828
* handle CAN operations.
2929
*
3030
* @param[in] can The CAN interface that will be used for the stack driver
31-
* @param[in] messageQueue Queue that will be read from for receiveing CAN messages
31+
* @param[in] messageQueue Queue that will be read from for receiving CAN messages
3232
* @param[out] canDriver The CANopen stack driver to populate
3333
*/
3434
void getCANopenCANDriver(CAN* can, types::FixedQueue<CANOPEN_QUEUE_SIZE, io::CANMessage>* messageQueue,

src/core/io/CANopen.cpp

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -141,50 +141,22 @@ void processCANopenNode(CO_NODE* canNode) {
141141
}
142142

143143
CO_ERR SDOTransfer(CO_NODE& node, uint8_t* data, uint8_t size, uint32_t entry) {
144-
/**
145-
* Find the Client-SDO (CO_CSDO) object for the specified node.
146-
* @param node[in] is the CANopen node to operate on.
147-
* @return csdo[out] is the client-SDO object used to manage SDO communication.
148-
*/
144+
// Find the Client-SDO (CO_CSDO) object for the specified node.
149145
CO_CSDO* csdo = COCSdoFind(&(node), 0);
150146

151-
/**
152-
* Initiate an SDO download request.
153-
* @param csdo[in] is the client-SDO object.
154-
* @param entry[in] specifies the object dictionary entry (index and subindex).
155-
* @param data[in] is the pointer to the data to be sent.
156-
* @param size[in] is the size of the data to be sent.
157-
* @param AppCSdoTransferCb[in] is the callback function to be called upon transfer completion.
158-
* @param 1000[in] is the timeout for the operation in milliseconds.
159-
* @return err[out] indicates the result of the operation (success or error code).
160-
*/
147+
// Initiate an SDO download request.
161148
CO_ERR err = COCSdoRequestDownload(csdo, entry, data, size, callback, 1000);
162149

163-
/* Return the result of the SDO transfer operation. */
164150
return err;
165151
}
166152

167153
CO_ERR SDOReceive(CO_NODE& node, uint8_t* data, uint8_t size, uint32_t entry) {
168-
/**
169-
* Find the Client-SDO (CO_CSDO) object for the specified node.
170-
* @param node[in] is the CANopen node to operate on.
171-
* @return csdo[out] is the client-SDO object used to manage SDO communication.
172-
*/
154+
// Find the Client-SDO (CO_CSDO) object for the specified node.
173155
CO_CSDO* csdo = COCSdoFind(&(node), 0);
174156

175-
/**
176-
* Initiate an SDO upload request.
177-
* @param csdo[in] is the client-SDO object.
178-
* @param entry[in] specifies the object dictionary entry (index and subindex).
179-
* @param data[out] is the pointer to store the received data.
180-
* @param size[in] is the size of the data buffer.
181-
* @param AppCSdoReceiveCb[in] is the callback function to be called upon reception completion.
182-
* @param 1000[in] is the timeout for the operation in milliseconds.
183-
* @return err[out] indicates the result of the operation (success or error code).
184-
*/
157+
// Initiate an SDO upload request.
185158
CO_ERR err = COCSdoRequestUpload(csdo, entry, data, size, callback, 1000);
186159

187-
/* Return the result of the SDO receive operation. */
188160
return err;
189161
}
190162

0 commit comments

Comments
 (0)