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.
CCS-COMM_BOARD/Protocol/CAN.h

34 lines
569 B
C

#pragma once
#include "DSP2833x_Device.h"
#include "DSP28x_Project.h"
namespace canSpace {
enum CAN_VARIANT{
NONE = 0,
CANA,
CANB
};
class CAN{
public:
CAN();
void initGpio(CAN_VARIANT canVarinat);
void config(CAN_VARIANT canVarinat, Uint16 baudrate);
2 months ago
void configRxMBoxes();
void configTxMBoxes();
void transmitMsg(Uint16 boxNumber, const MBOX& message);
void receiveMsg(Uint16 boxNumber);
private:
2 months ago
volatile ECAN_REGS* p_CanRegs_;
ECAN_REGS CanShadow_;
volatile ECAN_MBOXES* p_CanMBoxes_;
};
} // canSpace