User`s manual
These constant values define flags related to reception of a CAN message. There
could be more than one this flag ANDed together to form multiple flags. If a par-
ticular bit is set; corresponding meaning is TRUE or else it will be FALSE.
e.g.
if (MsgFlag and CAN_RX_OVERFLOW) <> 0 then
' Receiver overflow has occurred.
' We have lost our previous message.
...
const CAN_RX_FILTER_BITS = $07
' Use these to access filter bits
const CAN_RX_FILTER_1 = $00
const CAN_RX_FILTER_2 = $01
const CAN_RX_FILTER_3 = $02
const CAN_RX_FILTER_4 = $03
const CAN_RX_FILTER_5 = $04
const CAN_RX_FILTER_6 = $05
const CAN_RX_OVERFLOW = $08
' Set if Overflowed else cleared
const CAN_RX_INVALID_MSG = $10
' Set if invalid else cleared
const CAN_RX_XTD_FRAME = $20
' Set if XTD message else cleared
const CAN_RX_RTR_FRAME = $40
' Set if RTR message else cleared
const CAN_RX_DBL_BUFFERED = $80
' Set if this message was
' hardware double-buffered
These constant values define mask codes. Routine CANSetMask() requires this
code as one of its arguments. These enumerations must be used by itself i.e. it can-
not be ANDed to form multiple values.
const CAN_MASK_B1 = 0
const CAN_MASK_B2 = 1
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
120
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
CAN_RX_MSG_FLAGS
CAN_MASK