![]() |
ParaCAN 0.0.40-master SHA: 4c1cf74739
|
Hardware-independent parameterinterface implementation via Controller Area Network (CAN) More...
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | VERSION_CAN_PARALIB 6 |
| Version der Paralib für CAN. More... | |
Functions | |
| void | CAN_Para_Init (void) |
| Initialization of CAN Parameterinterface. More... | |
| void | CAN_Para_Cyclic (void) |
| Cyclic procedure to process messages that needs more than one answer message. More... | |
| uint8_t | CAN_Para_ReceiveIRQ (uint8_t data[8], uint32_t id, uint8_t DLC) |
| Reads Message from CAN-Interface and handles Parameter Request. More... | |
| void | CAN_Para_SendPing (void) |
| Send ping to connected PCs. More... | |
| void | CAN_SendTelegram (uint8_t data_length, uint8_t *data, uint16_t id_value) |
| Send CAN Message to transmit Buffer. More... | |
Variables | |
| const uint16_t | cui16_CANBaseAddress |
| const uint16_t | cui16_CANBroadcastAddress |
Hardware-independent parameterinterface implementation via Controller Area Network (CAN)
© Copyright 2017-2022 Copyright: Torquetronik GmbH Stütingstraße 30 58285 Gevelsberg
| #define VERSION_CAN_PARALIB 6 |
Version der Paralib für CAN.
| void CAN_Para_Cyclic | ( | void | ) |
Cyclic procedure to process messages that needs more than one answer message.
This function must be called regularly, or from CAN transmit interrupt. If the global variable g_ui32CAN_RemainingDataToSend > 0 the remaining data is sent. If further characters in the string or other subIDs are to be transmitted, these are sent.
| void CAN_Para_Init | ( | void | ) |
Initialization of CAN Parameterinterface.
Must be called before using all other functions. Local variables are initialized here.
| uint8_t CAN_Para_ReceiveIRQ | ( | uint8_t | data[8], |
| uint32_t | id, | ||
| uint8_t | DLC | ||
| ) |
Reads Message from CAN-Interface and handles Parameter Request.
Is normally called from receive-interrupt. After processing the CAN-Message the answer is sent depending on the message type.
| 1 | Data is processed |
| 0 | Data is not processed. |
| data | Data of the received CAN-Telegram. |
| id | Identifier of the received CAN-Telegram. |
| DLC | Number of bytes received in this CAN-Telegram. |
| void CAN_Para_SendPing | ( | void | ) |
Send ping to connected PCs.
Send one Ping from Device for Autoconnect to PC, to announce presence of Device. The Device starts connecting afterwards. Should mot be send faster than in a 500ms cycle.
| void CAN_SendTelegram | ( | uint8_t | data_length, |
| uint8_t * | data, | ||
| uint16_t | id_value | ||
| ) |
Send CAN Message to transmit Buffer.
| data_length | Length of CAN-Telegram |
| data | Data-Bytes |
| id_value | CAN-Identifier |
< Standard Id
< Data frame
< Peripheral base address in the alias region
|
extern |
|
extern |