43 #define CAN_ERROR 0xff 58 #define CAN0_IO_P10_P11 0 63 #define CAN0_IO_P16_P17 1 68 #define CAN0_IO_P34_P35 2 73 #define CAN0_IO_P40_P41 3 78 #define CAN1_IO_P01_P02 4 83 #define CAN1_IO_P14_P13 5 88 #define CAN1_IO_P32_P33 6 98 #define CAN_ENDIAN_INTEL 0 108 #define CAN_ENDIAN_MOTOROLA 1 144 void hsk_can_init(
const ubyte pins,
const ulong __xdata baud);
199 #define CAN_STATUS_LEC 0 209 #define CAN_STATUS_TXOK 1 219 #define CAN_STATUS_RXOK 2 230 #define CAN_STATUS_ALERT 3 240 #define CAN_STATUS_EWRN 4 250 #define CAN_STATUS_BOFF 5 353 ubyte *
const msgdata);
366 const ubyte *
const msgdata);
509 const bool extended,
const ubyte dlc);
619 ubyte *
const msgdata);
652 const bool sign,
const ubyte bitPos,
653 const char bitCount,
const ulong idata value);
672 const bool sign,
const ubyte bitPos,
673 const char bitCount);
uword size
The size of the data structure to persist.
Definition: hsk_flash.c:430
ulong hsk_can_fifo_getId(const hsk_can_fifo fifo)
Returns the CAN ID of the selected FIFO entry.
Definition: hsk_can.c:1429
ubyte hsk_can_msg_connect(const hsk_can_msg msg, const hsk_can_node node)
Connect a message object to a CAN node.
Definition: hsk_can.c:992
bool hsk_can_msg_updated(const hsk_can_msg msg)
Return whether the message was updated via CAN bus between this call and the previous call of this me...
Definition: hsk_can.c:1114
void hsk_can_fifo_setupRx(hsk_can_fifo fifo, const ulong id, const bool extended, const ubyte dlc)
Set the FIFO up for receiving messages.
Definition: hsk_can.c:1227
hsk_can_msg hsk_can_msg_create(const ulong id, const bool extended, const ubyte dlc)
Creates a new CAN message.
Definition: hsk_can.c:869
void hsk_can_data_setSignal(ubyte *const msg, const bool motorola, const bool sign, const ubyte bitPos, const char bitCount, const ulong value)
Sets a signal value in a data field.
Definition: hsk_can.c:1538
void hsk_can_msg_send(const hsk_can_msg msg)
Request transmission of a message.
Definition: hsk_can.c:1082
ubyte hsk_can_fifo
CAN message FIFO identifiers.
Definition: hsk_can.h:123
void hsk_can_msg_receive(const hsk_can_msg msg)
Return the message into RX mode after sending a message.
Definition: hsk_can.c:1106
void hsk_can_enable(const hsk_can_node node)
Go live on the CAN bus.
Definition: hsk_can.c:575
void hsk_can_fifo_getData(const hsk_can_fifo fifo, ubyte *const msgdata)
Gets the data from the currently selected FIFO entry.
Definition: hsk_can.c:1421
bool hsk_can_msg_sent(const hsk_can_msg msg)
Return whether the message was successfully sent between this and the previous call of this method...
Definition: hsk_can.c:1090
void hsk_can_disable(const hsk_can_node node)
Disable a CAN node.
Definition: hsk_can.c:584
void hsk_can_fifo_setRxMask(const hsk_can_fifo fifo, ulong msk)
Changes the ID matching mask of an RX FIFO.
Definition: hsk_can.c:1280
void hsk_can_fifo_next(const hsk_can_fifo fifo)
Select the next FIFO entry.
Definition: hsk_can.c:1392
void hsk_can_msg_setData(const hsk_can_msg msg, const ubyte *const msgdata)
Sets the current data in the CAN message.
Definition: hsk_can.c:1050
ubyte hsk_can_msg_delete(const hsk_can_msg msg)
Delete a CAN message object.
Definition: hsk_can.c:1002
ubyte hsk_can_node
CAN node identifiers.
Definition: hsk_can.h:113
ubyte hsk_can_fifo_connect(const hsk_can_fifo fifo, const hsk_can_node node)
Connect a FIFO to a CAN node.
Definition: hsk_can.c:1376
ubyte hsk_can_msg
CAN message object identifiers.
Definition: hsk_can.h:118
void hsk_can_msg_getData(const hsk_can_msg msg, ubyte *const msgdata)
Gets the current data in the CAN message.
Definition: hsk_can.c:1007
ulong hsk_can_data_getSignal(const ubyte *const msg, const bool motorola, const bool sign, const ubyte bitPos, const char bitCount)
Get a signal value from a data field.
Definition: hsk_can.c:1630
ubyte hsk_can_status(const hsk_can_node node, const ubyte field)
Returns a status field of a CAN node.
Definition: hsk_can.c:593
ubyte hsk_can_fifo_delete(const hsk_can_fifo fifo)
Delete a FIFO.
Definition: hsk_can.c:1387
void hsk_can_init(const ubyte pins, const ulong baud)
Setup CAN communication with the desired baud rate.
Definition: hsk_can.c:397
hsk_can_fifo hsk_can_fifo_create(ubyte size)
Creates a message FIFO.
Definition: hsk_can.c:1130
bool hsk_can_fifo_updated(const hsk_can_fifo fifo)
Return whether the currently selected FIFO entry was updated via CAN bus between this call and the pr...
Definition: hsk_can.c:1414
ubyte hsk_can_msg_disconnect(const hsk_can_msg msg)
Disconnect a CAN message object from its CAN node.
Definition: hsk_can.c:997
ubyte hsk_can_fifo_disconnect(const hsk_can_fifo fifo)
Disconnect a FIFO from its CAN node.
Definition: hsk_can.c:1382