You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
410 B
C
26 lines
410 B
C
2 months ago
|
#pragma once
|
||
|
|
||
|
#include "DSP2833x_Device.h"
|
||
|
#include "DSP28x_Project.h"
|
||
|
|
||
|
enum CAN_VARIANT{
|
||
|
NONE = 0,
|
||
|
CANA,
|
||
|
CANB
|
||
|
};
|
||
|
|
||
|
class CAN{
|
||
|
public:
|
||
|
CAN();
|
||
|
|
||
|
void initGpio(CAN_VARIANT canVarinat);
|
||
|
void config(CAN_VARIANT canVarinat, Uint16 baudrate);
|
||
|
|
||
|
void transmitMsg();
|
||
|
void receiveMsg();
|
||
|
|
||
|
private:
|
||
|
volatile struct ECAN_REGS* p_CanRegs_;
|
||
|
volatile struct ECAN_MBOXES* p_CanMBoxes_;
|
||
|
};
|