Merge pull request #2 from woodward1/patch-2

Set SPICS pin to output in begin()
This commit is contained in:
Loovee
2014-03-08 14:47:58 +08:00
+3
View File
@@ -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;