Skip to content

Commit

Permalink
Merge pull request #80 from 9uenther/main
Browse files Browse the repository at this point in the history
Add some 10MHz stuff
  • Loading branch information
aentinger authored Mar 11, 2023
2 parents 51aebd5 + aa78d9e commit 4b3d6f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/ArduinoMCP2515.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ static CanBitRateConfig const BIT_RATE_CONFIG_ARRAY[] =
BitRate_125kBPS_8MHz,
BitRate_250kBPS_8MHz,
BitRate_500kBPS_8MHz,
BitRate_1000kBPS_8MHz
BitRate_1000kBPS_8MHz,
BitRate_125kBPS_10MHz,
BitRate_250kBPS_10MHz,
BitRate_500kBPS_10MHz,
BitRate_1000kBPS_10MHz
};

/**************************************************************************************
Expand Down
6 changes: 5 additions & 1 deletion src/ArduinoMCP2515.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ enum class CanBitRate : size_t
BR_125kBPS_8MHZ = 4,
BR_250kBPS_8MHZ = 5,
BR_500kBPS_8MHZ = 6,
BR_1000kBPS_8MHZ = 7
BR_1000kBPS_8MHZ = 7,
BR_125kBPS_10MHZ = 8,
BR_250kBPS_10MHZ = 9,
BR_500kBPS_10MHZ = 10,
BR_1000kBPS_10MHZ = 11
};

typedef std::function<unsigned long()> MicroSecondFunc;
Expand Down
5 changes: 5 additions & 0 deletions src/MCP2515/MCP2515_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ static CanBitRateConfig constexpr BitRate_500kBPS_8MHz = {0x00, 0x90, 0x02};
static CanBitRateConfig constexpr BitRate_125kBPS_8MHz = {0x01, 0xb1, 0x05};
static CanBitRateConfig constexpr BitRate_1000kBPS_8MHz = {0x00, 0x80, 0x00};

static CanBitRateConfig constexpr BitRate_250kBPS_10MHz = {0x00, 0xB6, 0x04};
static CanBitRateConfig constexpr BitRate_500kBPS_10MHz = {0x00, 0x9A, 0x01};
static CanBitRateConfig constexpr BitRate_125kBPS_10MHz = {0x01, 0xB6, 0x04};
static CanBitRateConfig constexpr BitRate_1000kBPS_10MHz = {0x00, 0x80, 0x01};

/**************************************************************************************
* CTOR/DTOR
**************************************************************************************/
Expand Down

0 comments on commit 4b3d6f0

Please sign in to comment.