Skip to content

Commit

Permalink
use unsigned long type specifier in defines
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Apr 23, 2024
1 parent 74e6d49 commit 68d3c2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avlos/templates/tm_helpers.hpp.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#endif

#define CAN_EP_SIZE (12)
#define CAN_EP_MASK ((1 << CAN_EP_SIZE) - 1)
#define CAN_EP_MASK ((1UL << CAN_EP_SIZE) - 1)
#define CAN_SEQ_SIZE (9)
#define CAN_SEQ_MASK (((1 << CAN_SEQ_SIZE) - 1) << CAN_EP_SIZE)
#define CAN_SEQ_MASK (((1UL << CAN_SEQ_SIZE) - 1) << CAN_EP_SIZE)
#define CAN_DEV_SIZE (8)
#define CAN_DEV_MASK (((1 << CAN_DEV_SIZE) - 1) << (CAN_EP_SIZE + CAN_SEQ_SIZE))
#define CAN_DEV_MASK (((1UL << CAN_DEV_SIZE) - 1) << (CAN_EP_SIZE + CAN_SEQ_SIZE))

typedef void (*send_callback)(uint32_t arbitration_id, uint8_t *data, uint8_t dlc, bool rtr);
typedef bool (*recv_callback)(uint32_t *arbitration_id, uint8_t *data, uint8_t *dlc);
Expand Down

0 comments on commit 68d3c2f

Please sign in to comment.