PIC24 Support Libraries
Functions
pic24_ecan.h File Reference
#include <stdint.h>
#include "pic24_unions.h"
#include "pic24_chip.h"
#include "pic24_clockfreq.h"

Go to the source code of this file.

Functions

void formatStandardDataFrameECAN (ECANMSG *p_ecanmsg, uint16_t u16_id, uint8_t u8_len)
 
void formatExtendedDataFrameECAN (ECANMSG *p_ecanmsg, uint32_t u32_id, uint8_t u8_len)
 
uint32_t getIdExtendedDataFrameECAN (ECANMSG *p_ecanmsg)
 

Detailed Description

ECAN Header File

Definition in file pic24_ecan.h.

Function Documentation

◆ formatExtendedDataFrameECAN()

void formatExtendedDataFrameECAN ( ECANMSG *  p_ecanmsg,
uint32_t  u32_id,
uint8_t  u8_len 
)

Format an extended data frame u8_n for TX

Parameters
p_ecanmsgpointer to message buffer (ECANMSG* )
u32_idStandard Identifier (11-bit)
u8_lenNumber of data bytes in the message

Definition at line 121 of file pic24_ecan.c.

Referenced by formatStandardDataFrameECAN().

◆ formatStandardDataFrameECAN()

void formatStandardDataFrameECAN ( ECANMSG *  p_ecanmsg,
uint16_t  u16_id,
uint8_t  u8_len 
)

Format a standard data frame u8_n for TX

Parameters
p_ecanmsgpointer to message buffer (ECANMSG* )
u16_idStandard Identifier (11-bit)
u8_lenNumber of data bytes in the message

Definition at line 81 of file pic24_ecan.c.

◆ getIdExtendedDataFrameECAN()

uint32_t getIdExtendedDataFrameECAN ( ECANMSG *  p_ecanmsg)

Extract the 29-bit message id from an extended data frame

Parameters
p_ecanmsgpointer to RX message buffer (ECANMSG* )
Returns
29-bit message id

Definition at line 157 of file pic24_ecan.c.

Referenced by formatExtendedDataFrameECAN().