Functions | |
| int8_t | can_resetcontroller (uint8_t CAN_No) |
| Resets CAN controller. | |
| int8_t | can_setsiestamode (uint8_t CAN_No) |
| Puts the CAN Controller in SIESTA (low power) mode. | |
| int8_t | can_disablecontroller (uint8_t CAN_No) |
| Disables the CAN controller. | |
| int8_t | can_enablecontroller (uint8_t CAN_No) |
| Enables the CAN controller. | |
| int8_t | can_enablecontrollerpassive (uint8_t CAN_No) |
| Enables the CAN controller, but doesn't connect CAN transmit to the bus. | |
| int8_t | can_setrxwriteoverenable (uint8_t CAN_No, boolean writeover) |
| Sets the state of write over in the receiver buffer. | |
| int8_t | can_set11bitglobalidmask (uint8_t CAN_No, uint32_t *mask) |
| Sets the 11 bit Standard Global Id Mask. | |
| int8_t | can_set29bitglobalidmask (uint8_t CAN_No, uint32_t *mask) |
| Sets the 29 bit Standard Global Id Mask. | |
| int8_t | can_set11bitmessagecenter15idmask (uint8_t CAN_No, uint32_t *mask) |
| Sets the global 11 Bit Message Center 15 ID Mask. | |
| int8_t | can_set29bitmessagecenter15idmask (uint8_t CAN_No, uint32_t *mask) |
| Sets the global 29 Bit Message Center 15 ID Mask. | |
| int8_t | can_setmediaidmask (uint8_t CAN_No, uint16_t mask) |
| Sets the global media ID mask. | |
| int8_t | can_setmediaidarbitration (uint8_t CAN_No, uint16_t value) |
| Sets the global media ID arbitration. | |
| int8_t | can_setbaudrateprescaler (uint8_t CAN_No, uint16_t prescaler) |
| Sets the basic time quantum (tqu) necessary for CAN communication. | |
| int8_t | can_setsynchronizationjumpwidth (uint8_t CAN_No, uint8_t jumpWidth) |
| Sets the Synchronization Jump Width necessary for adjusting TSEG1 and TSEG2. | |
| int8_t | can_setsamplerate (uint8_t CAN_No, uint8_t sampleRate) |
| Sets the sample rate which is whether to use one or three samples per bit time during CAN communication. | |
| int8_t | can_settseg1 (uint8_t CAN_No, uint8_t tseg1) |
| Sets Timing Segment 1 to a specified number of time quanta. | |
| int8_t | can_settseg2 (uint8_t CAN_No, uint8_t tseg2) |
| Sets Timing Segment 1 to a specified number of time quanta. | |
| int8_t | can_enablemessagecenter (uint8_t CAN_No, uint8_t messageCenter) |
| Puts the message center into Active mode if disabled. | |
| int8_t | can_disablemessagecenter (uint8_t CAN_No, uint8_t messageCenter) |
| Puts the message center into Disabled mode if active. | |
| int8_t | can_freemessagecenter (uint8_t CAN_No, uint8_t messageCenter) |
| Returns the message center to the free pool. | |
| int8_t | can_setmessagecentertx (uint8_t CAN_No, uint8_t messageCenter) |
| Sets Tx/Rx bit of a specific message center to 1 (transmit). | |
| int8_t | can_setmessagecenterrx (uint8_t CAN_No, uint8_t messageCenter) |
| Sets Tx/Rx bit of a specific message center to 1 (receive). | |
| int8_t | can_set11bitmessagecenterarbitrationid (uint8_t CAN_No, uint8_t messageCenter, uint32_t *ID) |
| Sets the 11 bit Arbitration ID. | |
| int8_t | can_set29bitmessagecenterarbitrationid (uint8_t CAN_No, uint8_t messageCenter, uint32_t *ID) |
| Sets the 29 bit Arbitration ID. | |
| int8_t | can_setmessagecentermessageidmaskenable (uint8_t CAN_No, uint8_t messageCenter, boolean maskEnable) |
| Enables or disables Message ID Masking for a specific message center. | |
| int8_t | can_setmessagecentermediaidmaskenable (uint8_t CAN_No, uint8_t messageCenter, boolean maskEnable) |
| Enables or disables Media ID Masking for a specific message center. | |
|
|
Disables the CAN controller. Disables the CAN controller so that the controller is disconnected from the bus preventing any transmissions, or receptions. This is essential to change timing, global masks and other communication critical parameters. Message centers, transmit & receive buffers and message center allotments remain intact.
|
|
||||||||||||
|
Puts the message center into Disabled mode if active. Puts the message center into Disabled mode if Active. i.e, If the message center is in MC_RX_ACTIVE mode, then it is put into MC_RX_DISABLED mode, and if the message center is in MC_AARFR_ACTIVE mode, then it is put into MC_AARFR_DISABLED mode. If the message center is in MC_TX_ACTIVE mode, then it is not put into MC_TX_DISABLED mode, but is made as MC_IDLE.
|
|
|
Enables the CAN controller. Starts up the CAN controller, and connects to the bus. All critical timing parameters and global masks must already be set. Message centers, transmit & receive buffers and message center allotments remain intact.
|
|
|
Enables the CAN controller, but doesn't connect CAN transmit to the bus. Starts up the CAN controller, but doesn't connect CAN transmit to the bus Becomes a quiet listener on the bus. All critical timing parameters and global masks must already be set. Message centers, transmit & receive buffers and message centre allotments remain intact.
|
|
||||||||||||
|
Puts the message center into Active mode if disabled. Puts the message center into Active mode if disabled. i.e, If the message center is in MC_RX_DISABLED mode, then it is put into MC_RX_ACTIVE mode. If the message center is in MC_TX_DISABLED mode, then it is put into MC_TX_ACTIVE mode, and If the message center is in MC_AARFR_DISABLED mode, then it is put into MC_AARFR_ACTIVE mode. All Message Center settings & changes must be complete before this function is called.
|
|
||||||||||||
|
Returns the message center to the free pool. Returns the message center to the free pool. The Message Centre will have to be disabled before it can be freed. Else it will return error CAN_ERROR_MC_ACTIVE. In case of Transmit Message centres, it will get disabled as soon as the transmission (of one CAN frame) is completed. In case of Receive Message Centres, it will have to be explicitly disabled (to prevent further reception) using can_disableMessageCenter before it can be freed.
|
|
|
Resets CAN controller. Resets the CAN controller to it's power on default state. But it retains the Tx and Rx buffer contents.
|
|
||||||||||||
|
Sets the 11 bit Standard Global Id Mask. Sets the 11 bit Standard Global Id Mask. The Global ID Mask is used to denote which bits to match in the incoming frame ID. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets the global 11 Bit Message Center 15 ID Mask. Sets the global 11 Bit Message Center 15 ID Mask. Message Center 15 has it's own ID Mask, which is used to denote which bits to match in the Message Center 15 ID. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||||||
|
Sets the 11 bit Arbitration ID. Sets the 11 bit Arbitration ID. When this value matches an incoming frame ID subject to the Global ID Mask or Message Center 15 Mask, the incoming frame will be received. This function will also change the specified message center to standard mode, to only respond to 11 bit messages. The Message Centre must be either disabled or free before this function is called, else it will return error CAN_ERROR_MC_ACTIVE.
|
|
||||||||||||
|
Sets the 29 bit Standard Global Id Mask. Sets the 29 bit Standard Global Id Mask. The Global ID Mask is used to denote which bits to match in the incoming frame ID. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets the global 29 Bit Message Center 15 ID Mask. Sets the global 29 Bit Message Center 15 ID Mask. Message Center 15 has it's own ID Mask, which is used to denote which bits to match in the Message Center 15 ID. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||||||
|
Sets the 29 bit Arbitration ID. Sets the 29 bit Arbitration ID. When this value matches an incoming frame ID subject to the Global ID Mask or Message Center 15 Mask, the incoming frame will be received. This function will also change the specified message center to extended mode, to only respond to 29 bit messages. The Message Centre must be either disabled or free before this function is called, else it will return error CAN_ERROR_MC_ACTIVE.
|
|
||||||||||||
|
Sets the basic time quantum (tqu) necessary for CAN communication. Sets the basic time quantum (tqu) necessary for CAN communication. It sets the baud rate prescaler from the CPU crystal. The divisor divides straight off the external crystal on the processor. For instance, at 18.432MHz, a divisor of 7 will give you a tqu of 379.774ns. i.e tqu = 7 * 1/18.432MHz. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets the global media ID arbitration. Sets sets the global media ID arbitration value which matches bits in the first two bytes of the incoming frame data area. MSB is First Data byte, and LSB is second data byte. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets the global media ID mask. Sets the global media ID mask which determines what bits to match in the first two bytes of the incoming frame data area. MSB of mask is First Data byte, and LSB is second data byte. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||||||
|
Enables or disables Media ID Masking for a specific message center. Enables or disables Media ID Masking for a specific message center. If masking is disabled, no checks will occur on the first two data bytes. The Message Centre must be either disabled or free before this function is called, else it will return error CAN_ERROR_MC_ACTIVE.
|
|
||||||||||||||||
|
Enables or disables Message ID Masking for a specific message center. Enables or disables Message ID Masking for a specific message center. If masking is disabled, the message center ID must match ALL bits of incoming ID. The Message Centre must be either disabled or free before this function is called, else it will return error CAN_ERROR_MC_ACTIVE.
|
|
||||||||||||
|
Sets Tx/Rx bit of a specific message center to 1 (receive). Sets Tx/Rx bit of a specific message center to 0 (receive). It doesn't affect the mode of the Message Center. The Message Centre must be either disabled or free before this function is called, else it will return the error CAN_ERROR_MC_ACTIVE.
|
|
||||||||||||
|
Sets Tx/Rx bit of a specific message center to 1 (transmit). Sets Tx/Rx bit of a specific message center to 1 (transmit). It doesn't affect the mode of the Message Center. The Message Centre must be either disabled or free before this function is called, else it will return the error CAN_ERROR_MC_ACTIVE. Message Center 15 can't be set to transmit mode.
|
|
||||||||||||
|
Sets the state of write over in the receiver buffer. Sets the state of write over in the receiver buffer. If writeover is set to 0, the latest message will be discarded in case of receive buffer overflow. If set to 1, the oldest message in the receive buffer will be discarded.
|
|
||||||||||||
|
Sets the sample rate which is whether to use one or three samples per bit time during CAN communication. Sets SMP (Sample Rate) which is whether to use one or three samples per bit time during CAN communication. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
|
Puts the CAN Controller in SIESTA (low power) mode. Puts the CAN Controller in SIESTA (low power) mode. When Bus activity is detected, the controller will wake up and participate on the bus.
|
|
||||||||||||
|
Sets the Synchronization Jump Width necessary for adjusting TSEG1 and TSEG2. Sets the SJW (Synchronization Jump Width) necessary for adjusting TSEG1 and TSEG2 to compensate for sync problems during CAN communication. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets Timing Segment 1 to a specified number of time quanta. Sets TSEG1 (Timing Segment 1 = PROP_SEG + PHASE_SEG1) to a specified number of time quanta. This is the timing segment before the bit sample. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
|
||||||||||||
|
Sets Timing Segment 1 to a specified number of time quanta. Sets TSEG2 (Timing Segment 2 = PHASE_SEG2) to a specified number of time quanta. This is the timing segment before the bit sample. This function requires the CAN port to be disabled else will return error CAN_ERROR_PORT_ENABLED.
|
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |