Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo Fixes & Remove __builtin_bswap8 #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions isotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static int isotp_send_consecutive_frame(IsoTpLink* link) {
assert(link->send_size > 7);

/* setup message */
message.as.consecutive_frame.type = TSOTP_PCI_TYPE_CONSECUTIVE_FRAME;
message.as.consecutive_frame.type = ISOTP_PCI_TYPE_CONSECUTIVE_FRAME;
message.as.consecutive_frame.SN = link->send_sn;
data_length = link->send_size - link->send_offset;
if (data_length > sizeof(message.as.consecutive_frame.data)) {
Expand Down Expand Up @@ -348,7 +348,7 @@ void isotp_on_can_message(IsoTpLink *link, uint8_t *data, uint8_t len) {

break;
}
case TSOTP_PCI_TYPE_CONSECUTIVE_FRAME: {
case ISOTP_PCI_TYPE_CONSECUTIVE_FRAME: {
/* check if in receiving status */
if (ISOTP_RECEIVE_STATUS_INPROGRESS != link->receive_status) {
link->receive_protocol_result = ISOTP_PROTOCOL_RESULT_UNEXP_PDU;
Expand Down
3 changes: 1 addition & 2 deletions isotp_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#ifdef _WIN32
#define ISOTP_BYTE_ORDER_LITTLE_ENDIAN
#define __builtin_bswap8 _byteswap_uint8
#define __builtin_bswap16 _byteswap_uint16
#define __builtin_bswap32 _byteswap_uint32
#define __builtin_bswap64 _byteswap_uint64
Expand Down Expand Up @@ -196,7 +195,7 @@ typedef struct {
typedef enum {
ISOTP_PCI_TYPE_SINGLE = 0x0,
ISOTP_PCI_TYPE_FIRST_FRAME = 0x1,
TSOTP_PCI_TYPE_CONSECUTIVE_FRAME = 0x2,
ISOTP_PCI_TYPE_CONSECUTIVE_FRAME = 0x2,
ISOTP_PCI_TYPE_FLOW_CONTROL_FRAME = 0x3
} IsoTpProtocolControlInformation;

Expand Down