Cosmetic update to some comments

This commit is contained in:
Gregory Nutt
2015-08-05 08:07:58 -06:00
parent 6909553d81
commit e3decca82c
4 changed files with 12 additions and 4 deletions
+1 -1
Submodule arch updated: 52f459de14...393a1dcf68
+1 -1
Submodule configs updated: bba0b5c9b5...86d7dde23b
+9 -1
View File
@@ -811,7 +811,15 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
if (nexttail != fifo->rx_head)
{
/* Add the new, decoded CAN message at the tail of the FIFO */
/* Add the new, decoded CAN message at the tail of the FIFO.
*
* REVISIT: In the CAN FD format, the coding of the DLC differs from
* the standard CAN format. The DLC codes 0 to 8 have the same coding
* as in standard CAN, the codes 9 to 15, which in standard CAN all
* code a data field of 8 bytes, are encoded:
*
* 9->12, 10->16, 11->20, 12->24, 13->32, 14->48, 15->64
*/
memcpy(&fifo->rx_buffer[fifo->rx_tail].cm_hdr, hdr, sizeof(struct can_hdr_s));
for (i = 0, dest = fifo->rx_buffer[fifo->rx_tail].cm_data; i < hdr->ch_dlc; i++)
+1 -1
View File
@@ -167,7 +167,7 @@ struct can_hdr_s
#else
struct can_hdr_s
{
uint16_t ch_dlc : 4; /* 4-bit DLC */
uint16_t ch_dlc : 4; /* 4-bit DLC. May be encoded in CAN_FD mode. */
uint16_t ch_rtr : 1; /* RTR indication */
uint16_t ch_id : 11; /* 11-bit standard ID */
} packed_struct;