Rev 59 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 59 | Rev 63 | ||
|---|---|---|---|
| Line 63... | Line 63... | ||
| 63 | * Pointer to the CAN message storage buffer. |
63 | * Pointer to the CAN message storage buffer. |
| 64 | * @return |
64 | * @return |
| 65 | * CAN_OK if the message was successfully sent (or put in queue). |
65 | * CAN_OK if the message was successfully sent (or put in queue). |
| 66 | * CAN_FAILTX if the controller is busy AND the transmission queue is full. |
66 | * CAN_FAILTX if the controller is busy AND the transmission queue is full. |
| 67 | */ |
67 | */ |
| 68 | CanReturn_t CanSend( |
68 | CanReturn_t CanSend(CanMessage_t* msg) { |
| 69 | 69 | ||
| 70 | #ifdef CAN_CONTROLLER_MCP2515 |
70 | #ifdef CAN_CONTROLLER_MCP2515 |
| 71 | uint8_t res, txbuf_n; |
71 | uint8_t res, txbuf_n; |
| 72 | res = mcp2515_getNextFreeTXBuf(&txbuf_n); // info = addr. |
72 | res = mcp2515_getNextFreeTXBuf(&txbuf_n); // info = addr. |
| 73 | if (res == MCP_ALLTXBUSY) { |
73 | if (res == MCP_ALLTXBUSY) { |