SEED CAN FORK
Fork of SEEED_CAN by
Diff: seeed_can_spi.h
- Revision:
- 2:fd026fcfde94
- Parent:
- 1:ad71faa09868
--- a/seeed_can_spi.h Wed Nov 06 20:16:11 2013 +0000 +++ b/seeed_can_spi.h Tue Nov 12 20:54:16 2013 +0000 @@ -35,37 +35,37 @@ irq(_irq_) {} }; - typedef struct Seeed_MCP_CAN_Shield can_t; + typedef struct Seeed_MCP_CAN_Shield mcp_can_t; /** mcp2515 spi instructions */ - void mcpReset(can_t *obj); // reset the MCP2515 CAN controller chip + void mcpReset(mcp_can_t *obj); // reset the MCP2515 CAN controller chip - uint8_t mcpRead(can_t *obj, // read from a single MCP2512 register + uint8_t mcpRead(mcp_can_t *obj, // read from a single MCP2512 register const uint8_t address); - void mcpReadMultiple(can_t *obj, // read multiple, sequential, registers into an array + void mcpReadMultiple(mcp_can_t *obj, // read multiple, sequential, registers into an array const uint8_t address, uint8_t values[], const uint8_t n); - void mcpReadBuffer(can_t *obj, // read the specified receive buffer into an array + void mcpReadBuffer(mcp_can_t *obj, // read the specified receive buffer into an array const uint8_t command, uint8_t values[], const uint8_t n); - void mcpWrite(can_t *obj, // write to a single MCP2512 register + void mcpWrite(mcp_can_t *obj, // write to a single MCP2512 register const uint8_t address, const uint8_t value); - void mcpWriteMultiple(can_t *obj, // write an array into consecutive MCP2515 registers + void mcpWriteMultiple(mcp_can_t *obj, // write an array into consecutive MCP2515 registers const uint8_t address, const uint8_t values[], const uint8_t n); - void mcpWriteBuffer(can_t *obj, // write an array into the specified transmit buffer + void mcpWriteBuffer(mcp_can_t *obj, // write an array into the specified transmit buffer const uint8_t command, uint8_t values[], const uint8_t n); - void mcpBufferRTS(can_t *obj, const uint8_t command); // initiate transmission of the specified MCP2515 transmit buffer - uint8_t mcpStatus(can_t *obj); // read the MCP2515's status register - uint8_t mcpReceiveStatus(can_t *obj); // read mcp2515's receive status register - void mcpBitModify(can_t *obj, // modify bits of a register specified by a mask + void mcpBufferRTS(mcp_can_t *obj, const uint8_t command); // initiate transmission of the specified MCP2515 transmit buffer + uint8_t mcpStatus(mcp_can_t *obj); // read the MCP2515's status register + uint8_t mcpReceiveStatus(mcp_can_t *obj); // read mcp2515's receive status register + void mcpBitModify(mcp_can_t *obj, // modify bits of a register specified by a mask const uint8_t address, const uint8_t mask, const uint8_t data);