mirror of
https://github.com/Seeed-Studio/Seeed_Arduino_CAN.git
synced 2026-09-14 10:33:49 +00:00
Merge pull request #2 from woodward1/patch-2
Set SPICS pin to output in begin()
This commit is contained in:
@@ -576,6 +576,9 @@ INT8U MCP_CAN::begin(INT8U speedset)
|
||||
{
|
||||
INT8U res;
|
||||
|
||||
MCP2515_UNSELECT(); /* disable chip select to begin with */
|
||||
pinMode(SPICS, OUTPUT); /* make chip select pin an output */
|
||||
|
||||
SPI.begin();
|
||||
res = mcp2515_init(speedset);
|
||||
if (res == MCP2515_OK) return CAN_OK;
|
||||
|
||||
Reference in New Issue
Block a user