Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
CANInterface.h
- Committer:
- ashleymills
- Date:
- 2014-04-30
- Revision:
- 0:1ce2190bc4d2
File content as of revision 0:1ce2190bc4d2:
#pragma once
#include "mbed.h"
class CANInterface {
public:
enum BusSpeed {
CAN_SPEED_125=125000,
CAN_SPEED_250=250000,
CAN_SPEED_500=500000
};
enum MessageType {
CAN_PID_REQUEST=0x7DF,
CAN_PID_REPLY=0x7E8
};
CANInterface(PinName rd, PinName td);
~CANInterface();
int makeRequest(uint8_t pid, uint8_t *outBuf, int *outLen);
private:
CAN *_can;
Timer *_timer;
int _timeout;
};