Update configuration macros. SDO state machine preview.
This commit is contained in:
parent
6c24ecfcec
commit
5a2a1e85cf
8 changed files with 422 additions and 158 deletions
|
|
@ -55,87 +55,258 @@ extern "C" {
|
|||
* device and provides also some kind of user interface, so configuration of
|
||||
* the network is possible. Code for the SDO client is in file CO_SDOclient.h.
|
||||
*
|
||||
* SDO communication cycle is initiated by the client. Client can upload (read) data
|
||||
* from device or can download (write) data to device. If data are less or equal
|
||||
* of 4 bytes long, communication is finished by one server response (expedited
|
||||
* transfer). If data are longer, they are split into multiple segments of
|
||||
* request/response pairs (normal or segmented transfer). For longer data there
|
||||
* is also a block transfer protocol, which transfers larger block of data in
|
||||
* secure way with little protocol overhead. If error occurs during SDO transfer
|
||||
* #CO_SDO_abortCode_t is send by client or server and transfer is terminated.
|
||||
* SDO communication cycle is initiated by the client. Client can upload (read)
|
||||
* data from device or can download (write) data to device. If data size is less
|
||||
* or equal to 4 bytes, communication is finished by one server response
|
||||
* (expedited transfer). If data size is longer, data are split into multiple
|
||||
* segments of request/response pairs (normal or segmented transfer). For longer
|
||||
* data there is also a block transfer protocol, which transfers larger block of
|
||||
* data in secure way with little protocol overhead. If error occurs during SDO
|
||||
* transfer #CO_SDO_abortCode_t is send by client or server and transfer is
|
||||
* terminated. For more details see #CO_SDO_state_t.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup CO_SDO_messageContents SDO message contents
|
||||
* Internal states of the SDO state machine.
|
||||
*
|
||||
* Excerpt from CiA DS301, V4.2.
|
||||
*
|
||||
* For CAN identifier see #CO_Default_CAN_ID_t
|
||||
*
|
||||
* Expedited transfer is used for transmission of up to 4 data bytes. It consists
|
||||
* of one SDO request and one response. For longer variables is used segmented
|
||||
* or block transfer.
|
||||
*
|
||||
* ####Initiate SDO download (client request)
|
||||
* - byte 0: SDO command specifier. 8 bits: `0010nnes` (nn: if e=s=1,
|
||||
* number of data bytes, that do *not* contain data; e=1 for
|
||||
* expedited transfer; s=1 if data size is indicated).
|
||||
* - byte 1..2: Object index.
|
||||
* - byte 3: Object subIndex.
|
||||
* - byte 4..7: Expedited data or data size if segmented transfer.
|
||||
*
|
||||
* ####Initiate SDO download (server response)
|
||||
* - byte 0: SDO command specifier. 8 bits: `01100000`.
|
||||
* - byte 1..2: Object index.
|
||||
* - byte 3: Object subIndex.
|
||||
* - byte 4..7: reserved.
|
||||
*
|
||||
* ####Download SDO segment (client request)
|
||||
* - byte 0: SDO command specifier. 8 bits: `000tnnnc` (t: toggle bit set
|
||||
* to 0 in first segment; nnn: number of data bytes, that do
|
||||
* *not* contain data; c=1 if this is the last segment).
|
||||
* - byte 1..7: Data segment.
|
||||
*
|
||||
* ####Download SDO segment (server response)
|
||||
* - byte 0: SDO command specifier. 8 bits: `001t0000` (t: toggle bit set
|
||||
* to 0 in first segment).
|
||||
* - byte 1..7: Reserved.
|
||||
*
|
||||
* ####Initiate SDO upload (client request)
|
||||
* - byte 0: SDO command specifier. 8 bits: `01000000`.
|
||||
* - byte 1..2: Object index.
|
||||
* - byte 3: Object subIndex.
|
||||
* - byte 4..7: Reserved.
|
||||
*
|
||||
* ####Initiate SDO upload (server response)
|
||||
* - byte 0: SDO command specifier. 8 bits: `0100nnes` (nn: if e=s=1,
|
||||
* number of data bytes, that do *not* contain data; e=1 for
|
||||
* expedited transfer; s=1 if data size is indicated).
|
||||
* - byte 1..2: Object index.
|
||||
* - byte 3: Object subIndex.
|
||||
* - byte 4..7: reserved.
|
||||
*
|
||||
* ####Upload SDO segment (client request)
|
||||
* - byte 0: SDO command specifier. 8 bits: `011t0000` (t: toggle bit set
|
||||
* to 0 in first segment).
|
||||
* - byte 1..7: Reserved.
|
||||
*
|
||||
* ####Upload SDO segment (server response)
|
||||
* - byte 0: SDO command specifier. 8 bits: `000tnnnc` (t: toggle bit set
|
||||
* to 0 in first segment; nnn: number of data bytes, that do
|
||||
* *not* contain data; c=1 if this is the last segment).
|
||||
* - byte 1..7: Data segment.
|
||||
*
|
||||
* ####Abort SDO transfer (client or server)
|
||||
* - byte 0: SDO command specifier. 8 bits: `10000000`.
|
||||
* - byte 1..2: Object index.
|
||||
* - byte 3: Object subIndex.
|
||||
* - byte 4..7: #CO_SDO_abortCode_t.
|
||||
*
|
||||
* ####Block transfer
|
||||
* See DS301 V4.2.
|
||||
* Note: CANopen has little endian byte order.
|
||||
*/
|
||||
typedef enum {
|
||||
/**
|
||||
* - SDO client may start new download to or upload from specified node,
|
||||
* specified index and specified subindex. It can start normal or block
|
||||
* communication.
|
||||
* - SDO server is waiting for client request. */
|
||||
CO_SDO_ST_IDLE = 0x00U,
|
||||
/**
|
||||
* - Node-ID of the SDO server is the same as node-ID of this node, SDO client
|
||||
* is the same device as SDO server. Transfer data directly without
|
||||
* communication on CAN. */
|
||||
CO_SDO_ST_LOCAL_TRANSFER = 0x01U,
|
||||
/**
|
||||
* - SDO client or server may send SDO abort message in case of error:
|
||||
* - byte 0: @b 10000000 binary.
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: #CO_SDO_abortCode_t. */
|
||||
CO_SDO_ST_ABORT = 0x02U,
|
||||
|
||||
/**
|
||||
* - SDO client initiates SDO download:
|
||||
* - byte 0: @b 0010nnes binary: (nn: if e=s=1, number of data bytes, that do
|
||||
* @b not contain data; e=1 for expedited transfer; s=1 if data size is
|
||||
* indicated.)
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: If e=1, expedited data are here. If e=0 s=1, size of data for
|
||||
* segmented transfer is indicated here.
|
||||
* - SDO server is in #CO_SDO_ST_IDLE state and waits for client request. */
|
||||
CO_SDO_ST_DOWNLOAD_INITIATE_REQ = 0x11U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 01100000 binary.
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: Reserved.
|
||||
* - In case of expedited transfer communication ends here. */
|
||||
CO_SDO_ST_DOWNLOAD_INITIATE_RSP = 0x12U,
|
||||
/**
|
||||
* - SDO client sends SDO segment:
|
||||
* - byte 0: @b 000tnnnc binary: (t: toggle bit, set to 0 in first segment;
|
||||
* nnn: number of data bytes, that do @b not contain data; c=1 if this is the
|
||||
* last segment).
|
||||
* - byte 1..7: Data segment.
|
||||
* - SDO server waits for segment. */
|
||||
CO_SDO_ST_DOWNLOAD_SEGMENT_REQ = 0x13U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 001t0000 binary: (t: toggle bit, set to 0 in first segment).
|
||||
* - byte 1..7: Reserved.
|
||||
* - If c was set to 1, then communication ends here. */
|
||||
CO_SDO_ST_DOWNLOAD_SEGMENT_RSP = 0x14U,
|
||||
|
||||
/**
|
||||
* - SDO client initiates SDO upload:
|
||||
* - byte 0: @b 01000000 binary.
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: Reserved.
|
||||
* - SDO server is in #CO_SDO_ST_IDLE state and waits for client request. */
|
||||
CO_SDO_ST_UPLOAD_INITIATE_REQ = 0x21U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 0100nnes binary: (nn: if e=s=1, number of data bytes, that do
|
||||
* @b not contain data; e=1 for expedited transfer; s=1 if data size is
|
||||
* indicated).
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: If e=1, expedited data are here. If e=0 s=1, size of data for
|
||||
* segmented transfer is indicated here.
|
||||
* - In case of expedited transfer communication ends here. */
|
||||
CO_SDO_ST_UPLOAD_INITIATE_RSP = 0x22U,
|
||||
/**
|
||||
* - SDO client requests SDO segment:
|
||||
* - byte 0: @b 011t0000 binary: (t: toggle bit, set to 0 in first segment).
|
||||
* - byte 1..7: Reserved.
|
||||
* - SDO server waits for segment. */
|
||||
CO_SDO_ST_UPLOAD_SEGMENT_REQ = 0x23U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses with data:
|
||||
* - byte 0: @b 000tnnnc binary: (t: toggle bit, set to 0 in first segment;
|
||||
* nnn: number of data bytes, that do @b not contain data; c=1 if this is the
|
||||
* last segment).
|
||||
* - byte 1..7: Data segment.
|
||||
* - If c is set to 1, then communication ends here. */
|
||||
CO_SDO_ST_UPLOAD_SEGMENT_RSP = 0x24U,
|
||||
|
||||
/**
|
||||
* - SDO client initiates SDO block download:
|
||||
* - byte 0: @b 11000rs0 binary: (r=1 if client supports generating CRC on
|
||||
* data; s=1 if data size is indicated.)
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: If s=1, then size of data for block download is indicated here.
|
||||
* - SDO server is in #CO_SDO_ST_IDLE state and waits for client request. */
|
||||
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_REQ = 0x31U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 10100r00 binary: (r=1 if server supports generating CRC on
|
||||
* data.)
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4: blksize: Number of segments per block that shall be used by the
|
||||
* client for the following block download with 0 < blksize < 128.
|
||||
* - byte 5..7: Reserved. */
|
||||
CO_SDO_ST_DOWNLOAD_BLK_INITIATE_RSP = 0x32U,
|
||||
/**
|
||||
* - SDO client sends 'blksize' segments of data in sequence:
|
||||
* - byte 0: @b cnnnnnnn binary: (c=1 if no more segments to be downloaded,
|
||||
* enter SDO block download end phase; nnnnnnn is sequence number of segment,
|
||||
* 1..127.
|
||||
* - byte 1..7: At most 7 bytes of segment data to be downloaded.
|
||||
* - SDO server reads sequence of 'blksize' blocks. */
|
||||
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_REQ = 0x33U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 10100010 binary.
|
||||
* - byte 1: ackseq: sequence number of last segment that was received
|
||||
* successfully during the last block download. If ackseq is set to 0 the
|
||||
* server indicates the client that the segment with the sequence number 1
|
||||
* was not received correctly and all segments shall be retransmitted by the
|
||||
* client.
|
||||
* - byte 2: Number of segments per block that shall be used by the client for
|
||||
* the following block download with 0 < blksize < 128.
|
||||
* - byte 3..7: Reserved.
|
||||
* - If c was set to 1, then communication enters SDO block download end phase.
|
||||
*/
|
||||
CO_SDO_ST_DOWNLOAD_BLK_SUBBLOCK_RSP = 0x34U,
|
||||
/**
|
||||
* - SDO client sends SDO block download end:
|
||||
* - byte 0: @b 110nnn01 binary: (nnn: number of data bytes, that do @b not
|
||||
* contain data)
|
||||
* - byte 1..2: 16 bit CRC for the data set, if enabled by client and server.
|
||||
* - byte 3..7: Reserved.
|
||||
* - SDO server waits for client request. */
|
||||
CO_SDO_ST_DOWNLOAD_BLK_END_REQ = 0x35U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 10100001 binary.
|
||||
* - byte 1..7: Reserved.
|
||||
* - Block download successfully ends here.
|
||||
*/
|
||||
CO_SDO_ST_DOWNLOAD_BLK_END_RSP = 0x36U,
|
||||
|
||||
/**
|
||||
* - SDO client initiates SDO block upload:
|
||||
* - byte 0: @b 10100r00 binary: (r=1 if client supports generating CRC on
|
||||
* data.)
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4: blksize: Number of segments per block with 0 < blksize < 128.
|
||||
* - byte 5: pst - protocol switch threshold. If pst > 0 and size of the data
|
||||
* in bytes is less or equal pst, then the server may switch to the SDO
|
||||
* upload protocol #CO_SDO_ST_UPLOAD_INITIATE_RSP.
|
||||
* - byte 6..7: Reserved.
|
||||
* - SDO server is in #CO_SDO_ST_IDLE state and waits for client request. */
|
||||
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ = 0x41U,
|
||||
/**
|
||||
* - SDO client waits for response.
|
||||
* - SDO server responses:
|
||||
* - byte 0: @b 11000rs0 binary: (r=1 if server supports generating CRC on
|
||||
* data; s=1 if data size is indicated. )
|
||||
* - byte 1..3: Object index and subIndex.
|
||||
* - byte 4..7: If s=1, then size of data for block upload is indicated here.
|
||||
* - If enabled by pst, then server may alternatively response with
|
||||
* #CO_SDO_ST_UPLOAD_INITIATE_RSP */
|
||||
CO_SDO_ST_UPLOAD_BLK_INITIATE_RSP = 0x42U,
|
||||
/**
|
||||
* - SDO client sends second initiate for SDO block upload:
|
||||
* - byte 0: @b 10100011 binary.
|
||||
* - byte 1..7: Reserved.
|
||||
* - SDO server waits for client request. */
|
||||
CO_SDO_ST_UPLOAD_BLK_INITIATE_REQ2 = 0x43U,
|
||||
/**
|
||||
* - SDO client reads sequence of 'blksize' blocks.
|
||||
* - SDO server sends 'blksize' segments of data in sequence:
|
||||
* - byte 0: @b cnnnnnnn binary: (c=1 if no more segments to be uploaded,
|
||||
* enter SDO block upload end phase; nnnnnnn is sequence number of segment,
|
||||
* 1..127.
|
||||
* - byte 1..7: At most 7 bytes of segment data to be uploaded. */
|
||||
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_SREQ = 0x44U,
|
||||
/**
|
||||
* This is interim state after server finished sending sequence of segments in
|
||||
* one sub-block. This state is valid one cycle. In that state data should be
|
||||
* emptied from internal buffer. In the next cycle client will send response and
|
||||
* server will send another sequence of segments. */
|
||||
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_DATA_RDY = 0x45U,
|
||||
/**
|
||||
* - SDO client responses:
|
||||
* - byte 0: @b 10100010 binary.
|
||||
* - byte 1: ackseq: sequence number of last segment that was received
|
||||
* successfully during the last block upload. If ackseq is set to 0 the
|
||||
* client indicates the server that the segment with the sequence number 1
|
||||
* was not received correctly and all segments shall be retransmitted by the
|
||||
* server.
|
||||
* - byte 2: Number of segments per block that shall be used by the server for
|
||||
* the following block upload with 0 < blksize < 128.
|
||||
* - byte 3..7: Reserved.
|
||||
* - SDO server waits for response.
|
||||
* - If c was set to 1, then communication enters SDO block upload end phase. */
|
||||
CO_SDO_ST_UPLOAD_BLK_SUBBLOCK_CRSP = 0x46U,
|
||||
/**
|
||||
* - SDO client waits for server request.
|
||||
* - SDO server sends SDO block upload end:
|
||||
* - byte 0: @b 110nnn01 binary: (nnn: number of data bytes, that do @b not
|
||||
* contain data)
|
||||
* - byte 1..2: 16 bit CRC for the data set, if enabled by client and server.
|
||||
* - byte 3..7: Reserved. */
|
||||
CO_SDO_ST_UPLOAD_BLK_END_SREQ = 0x47U,
|
||||
/**
|
||||
* - SDO client responses:
|
||||
* - byte 0: @b 10100001 binary.
|
||||
* - byte 1..7: Reserved.
|
||||
* - SDO server waits for response.
|
||||
* - Block download successfully ends here. Note that this communication ends
|
||||
* with client response. Client may then start next SDO communication
|
||||
* immediately.
|
||||
*/
|
||||
CO_SDO_ST_UPLOAD_BLK_END_CRSP = 0x48U,
|
||||
|
||||
/* old state names, will be removed */
|
||||
CO_SDO_ST_DOWNLOAD_INITIATE = 0xA1U,
|
||||
CO_SDO_ST_DOWNLOAD_SEGMENTED = 0xA2U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_INITIATE = 0xA4U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUBBLOCK = 0xA5U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUB_RESP = 0xA6U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUB_RESP_2 = 0xA7U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_END = 0xA8U,
|
||||
CO_SDO_ST_UPLOAD_INITIATE = 0xB1U,
|
||||
CO_SDO_ST_UPLOAD_SEGMENTED = 0xB2U,
|
||||
CO_SDO_ST_UPLOAD_BL_INITIATE = 0xB4U,
|
||||
CO_SDO_ST_UPLOAD_BL_INITIATE_2 = 0xB5U,
|
||||
CO_SDO_ST_UPLOAD_BL_SUBBLOCK = 0xB6U,
|
||||
CO_SDO_ST_UPLOAD_BL_END = 0xB7U
|
||||
} CO_SDO_state_t;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -432,27 +603,6 @@ typedef enum{
|
|||
}CO_SDO_OD_flags_t;
|
||||
|
||||
|
||||
/**
|
||||
* Internal states of the SDO server state machine
|
||||
*/
|
||||
typedef enum {
|
||||
CO_SDO_ST_IDLE = 0x00U,
|
||||
CO_SDO_ST_DOWNLOAD_INITIATE = 0x11U,
|
||||
CO_SDO_ST_DOWNLOAD_SEGMENTED = 0x12U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_INITIATE = 0x14U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUBBLOCK = 0x15U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUB_RESP = 0x16U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_SUB_RESP_2 = 0x17U,
|
||||
CO_SDO_ST_DOWNLOAD_BL_END = 0x18U,
|
||||
CO_SDO_ST_UPLOAD_INITIATE = 0x21U,
|
||||
CO_SDO_ST_UPLOAD_SEGMENTED = 0x22U,
|
||||
CO_SDO_ST_UPLOAD_BL_INITIATE = 0x24U,
|
||||
CO_SDO_ST_UPLOAD_BL_INITIATE_2 = 0x25U,
|
||||
CO_SDO_ST_UPLOAD_BL_SUBBLOCK = 0x26U,
|
||||
CO_SDO_ST_UPLOAD_BL_END = 0x27U
|
||||
} CO_SDO_state_t;
|
||||
|
||||
|
||||
/**
|
||||
* Object for one entry with specific index in @ref CO_SDO_objectDictionary.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ extern "C" {
|
|||
* be used for LEDs.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_NMT CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_NMT_CALLBACK_CHANGE | CO_CONFIG_NMT_MASTER | CO_CONFIG_NMT_LEDS
|
||||
#define CO_CONFIG_NMT (CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_NMT_CALLBACK_CHANGE | CO_CONFIG_NMT_MASTER | CO_CONFIG_NMT_LEDS)
|
||||
#endif
|
||||
#define CO_CONFIG_NMT_CALLBACK_CHANGE 0x01
|
||||
#define CO_CONFIG_NMT_MASTER 0x02
|
||||
|
|
@ -122,7 +122,7 @@ extern "C" {
|
|||
* CO_CONFIG_SDO_SEGMENTED must also be set.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_SDO CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_SDO_SEGMENTED | CO_CONFIG_SDO_BLOCK
|
||||
#define CO_CONFIG_SDO (CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_SDO_SEGMENTED | CO_CONFIG_SDO_BLOCK)
|
||||
#endif
|
||||
/* TODO with new OD */
|
||||
#define CO_CONFIG_SDO_SEGMENTED 0x01
|
||||
|
|
@ -130,7 +130,7 @@ extern "C" {
|
|||
|
||||
|
||||
/**
|
||||
* Size of the internal SDO buffer.
|
||||
* Size of the internal data buffer for the SDO server.
|
||||
*
|
||||
* Size must be at least equal to size of largest variable in
|
||||
* @ref CO_SDO_objectDictionary. If data type is domain, data length is not
|
||||
|
|
@ -139,7 +139,7 @@ extern "C" {
|
|||
*
|
||||
* Value can be in range from 7 to 889 bytes.
|
||||
*/
|
||||
#ifndef CO_CONFIG_SDO_BUFFER_SIZE
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_SDO_BUFFER_SIZE 32
|
||||
#endif
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ extern "C" {
|
|||
* - CO_CONFIG_EM_CONSUMER - Enable emergency consumer.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_EM CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_EM_CONSUMER
|
||||
#define CO_CONFIG_EM (CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_EM_CONSUMER)
|
||||
#endif
|
||||
#define CO_CONFIG_EM_CONSUMER 0x01
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ extern "C" {
|
|||
* NMT state of the specific monitored node.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_HB_CONS CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_HB_CONS_CALLBACK_CHANGE | CO_CONFIG_HB_CONS_CALLBACK_MULTI | CO_CONFIG_HB_CONS_QUERY_FUNCT
|
||||
#define CO_CONFIG_HB_CONS (CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_HB_CONS_CALLBACK_CHANGE | CO_CONFIG_HB_CONS_CALLBACK_MULTI | CO_CONFIG_HB_CONS_QUERY_FUNCT)
|
||||
#endif
|
||||
#define CO_CONFIG_HB_CONS_CALLBACK_CHANGE 0x01
|
||||
#define CO_CONFIG_HB_CONS_CALLBACK_MULTI 0x02
|
||||
|
|
@ -198,7 +198,7 @@ extern "C" {
|
|||
* - CO_CONFIG_PDO_SYNC_ENABLE - Enable SYNC object inside PDO objects.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_PDO CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_PDO_SYNC_ENABLE
|
||||
#define CO_CONFIG_PDO (CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_PDO_SYNC_ENABLE)
|
||||
#endif
|
||||
#define CO_CONFIG_PDO_SYNC_ENABLE 0x01
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ extern "C" {
|
|||
* inside CO_SYNC_process().
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_SYNC CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SYNC (CO_CONFIG_FLAG_TIMERNEXT)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -225,9 +225,34 @@ extern "C" {
|
|||
* - #CO_CONFIG_FLAG_TIMERNEXT - Enable calculation of timerNext_us variable
|
||||
* inside CO_SDOclientDownloadInitiate(), CO_SDOclientDownload(),
|
||||
* CO_SDOclientUploadInitiate(), CO_SDOclientUpload().
|
||||
* - CO_CONFIG_SDO_CLI_SEGMENTED - Enable SDO server segmented transfer.
|
||||
* - CO_CONFIG_SDO_CLI_BLOCK - Enable SDO server block transfer. If set, then
|
||||
* CO_CONFIG_SDO_CLI_SEGMENTED must also be set.
|
||||
* - CO_CONFIG_SDO_CLI_LOCAL - Enable local transfer, if Node-ID of the SDO
|
||||
* server is the same as node-ID of the SDO client. (SDO client is the same
|
||||
* device as SDO server.) Transfer data directly without communication on CAN.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_SDO_CLI CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SDO_CLI (CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_SDO_CLI_SEGMENTED | CO_CONFIG_SDO_CLI_BLOCK | CO_CONFIG_SDO_CLI_LOCAL)
|
||||
#endif
|
||||
#define CO_CONFIG_SDO_CLI_SEGMENTED 0x01
|
||||
#define CO_CONFIG_SDO_CLI_BLOCK 0x02
|
||||
#define CO_CONFIG_SDO_CLI_LOCAL 0x04
|
||||
|
||||
|
||||
/**
|
||||
* Size of the internal data buffer for the SDO client.
|
||||
*
|
||||
* Circular buffer is used for SDO communication. it can be read or written
|
||||
* between successive SDO calls. So size of the buffer can be lower than size of
|
||||
* the actual size of data transferred. If only segmented transfer is used, then
|
||||
* buffer size can be as low as 7 bytes, if data are read/written each cycle. If
|
||||
* block transfer is used, buffer size should be set to at least 889 bytes, so
|
||||
* maximum blksize can be used. In that case data should be read/written proper
|
||||
* time between cycles.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE 32
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -240,26 +265,39 @@ extern "C" {
|
|||
* Callback is configured by CO_LSSmaster_initCallbackPre().
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_LSS_MST CO_CONFIG_FLAG_CALLBACK_PRE
|
||||
#define CO_CONFIG_LSS_MST (CO_CONFIG_FLAG_CALLBACK_PRE)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Configuration of Standard CiA 309 usage.
|
||||
* Configuration of gateway object usage.
|
||||
*
|
||||
* CiA 309 standard covers CANopen access from other networks. It enables
|
||||
* usage of the NMT master, SDO client and LSS master as a gateway device.
|
||||
* Gateway object is covered by standard CiA 309 - CANopen access from other
|
||||
* networks. It enables usage of the NMT master, SDO client and LSS master as a
|
||||
* gateway device.
|
||||
*
|
||||
* Value can be one of the following:
|
||||
* - 0: Disabled.
|
||||
* - 1: Interface enabled
|
||||
* - 2: Modbus/TCP mapping (Not implemented)
|
||||
* - 3: ASCII mapping
|
||||
* - 4: Profinet (Not implemented)
|
||||
* Possible flags, can be ORed:
|
||||
* - CO_CONFIG_GTW_MULTI_NET - Enable multiple network interfaces in gateway
|
||||
* device. This functionality is currntly not implemented.
|
||||
* - CO_CONFIG_GTW_ASCII - Enable gateway device with ASCII mapping (CiA 309-3)
|
||||
*/
|
||||
#ifndef CO_CONFIG_309
|
||||
#define CO_CONFIG_309 0
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_GTW (CO_CONFIG_GTW_MULTI_NET | CO_CONFIG_GTW_ASCII)
|
||||
#endif
|
||||
#define CO_CONFIG_GTW_MULTI_NET 0x01
|
||||
#define CO_CONFIG_GTW_ASCII 0x02
|
||||
|
||||
|
||||
/**
|
||||
* Size of command buffer in ASCII gateway object.
|
||||
*
|
||||
* If large amount of data is transferred (block transfer), the this should be
|
||||
* increased to 1000 or more. Buffer may be refilled between the block transfer.
|
||||
*/
|
||||
#ifdef CO_DOXYGEN
|
||||
#define CO_CONFIG_GTWA_COMM_BUF_SIZE 100
|
||||
#endif
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#ifndef CO_DRIVER_H
|
||||
#define CO_DRIVER_H
|
||||
|
||||
#include "CO_driver_target.h"
|
||||
#include "CO_config.h"
|
||||
#include "CO_driver_target.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -38,11 +38,11 @@ extern "C" {
|
|||
/* Default stack configuration for most common configuration, may be overridden
|
||||
* by CO_driver_target.h. For more information see file CO_config.h. */
|
||||
#ifndef CO_CONFIG_NMT
|
||||
#define CO_CONFIG_NMT 0
|
||||
#define CO_CONFIG_NMT (0)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO
|
||||
#define CO_CONFIG_SDO CO_CONFIG_SDO_SEGMENTED
|
||||
#define CO_CONFIG_SDO (CO_CONFIG_SDO_SEGMENTED)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_BUFFER_SIZE
|
||||
|
|
@ -50,33 +50,43 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_EM
|
||||
#define CO_CONFIG_EM 0
|
||||
#define CO_CONFIG_EM (0)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_HB_CONS
|
||||
#define CO_CONFIG_HB_CONS 0
|
||||
#define CO_CONFIG_HB_CONS (0)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_PDO
|
||||
#define CO_CONFIG_PDO CO_CONFIG_PDO_SYNC_ENABLE
|
||||
#define CO_CONFIG_PDO (CO_CONFIG_PDO_SYNC_ENABLE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SYNC
|
||||
#define CO_CONFIG_SYNC 0
|
||||
#define CO_CONFIG_SYNC (0)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI
|
||||
#define CO_CONFIG_SDO_CLI 0
|
||||
#define CO_CONFIG_SDO_CLI (CO_CONFIG_SDO_CLI_SEGMENTED | \
|
||||
CO_CONFIG_SDO_CLI_LOCAL)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI_BUFFER_SIZE
|
||||
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE 32
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_LSS_MST
|
||||
#define CO_CONFIG_LSS_MST 0
|
||||
#define CO_CONFIG_LSS_MST (0)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_309
|
||||
#define CO_CONFIG_309 0
|
||||
#ifndef CO_CONFIG_GTW
|
||||
#define CO_CONFIG_GTW (0)
|
||||
#endif
|
||||
|
||||
#if (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII
|
||||
#ifndef CO_CONFIG_GTWA_COMM_BUF_SIZE
|
||||
#define CO_CONFIG_GTWA_COMM_BUF_SIZE 100
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup CO_driver Driver
|
||||
|
|
|
|||
32
CANopen.h
32
CANopen.h
|
|
@ -70,7 +70,7 @@ extern "C" {
|
|||
* @defgroup CO_CANopen_301 CANopen_301
|
||||
* @{
|
||||
*
|
||||
* CANopen application layer and communication profile.
|
||||
* CANopen application layer and communication profile (CiA 301 v4.2.0)
|
||||
*
|
||||
* Definitions of data types, encoding rules, object dictionary objects and
|
||||
* CANopen communication services and protocols.
|
||||
|
|
@ -81,7 +81,7 @@ extern "C" {
|
|||
* @defgroup CO_CANopen_305 CANopen_305
|
||||
* @{
|
||||
*
|
||||
* CANopen layer setting services (LSS) and protocols.
|
||||
* CANopen layer setting services (LSS) and protocols (CiA 305 DSP v3.0.0)
|
||||
*
|
||||
* Inquire or change three parameters on a CANopen device with LSS slave
|
||||
* capability by a CANopen device with LSS master capability via the CAN
|
||||
|
|
@ -91,6 +91,21 @@ extern "C" {
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup CO_CANopen_309 CANopen_309
|
||||
* @{
|
||||
*
|
||||
* CANopen access from other networks (CiA 309)
|
||||
*
|
||||
* Standard defines the services and protocols to interface CANopen networks to
|
||||
* other networks. Standard is organized as follows:
|
||||
* - Part 1: General principles and services
|
||||
* - Part 2: Modbus/TCP mapping
|
||||
* - Part 3: ASCII mapping
|
||||
* - Part 4: Amendment 7 to Fieldbus Integration into PROFINET IO
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup CO_CANopen_extra CANopen_extra
|
||||
* @{
|
||||
|
|
@ -314,18 +329,15 @@ CO_ReturnError_t CO_CANopenInit(uint8_t nodeId);
|
|||
* @param co CANopen object.
|
||||
* @param timeDifference_us Time difference from previous function call in
|
||||
* microseconds.
|
||||
* @param timerNext_us [out] info to OS - maximum delay time after this function
|
||||
* @param [out] timerNext_us info to OS - maximum delay time after this function
|
||||
* should be called next time in [microseconds]. Value can be used for OS
|
||||
* sleep time. Initial value must be set to maximum interval time.
|
||||
* Output will be equal or lower to initial value. Calculation is based
|
||||
* on various timers which expire in known time. Parameter should be
|
||||
* used in combination with callbacks configured with
|
||||
* CO_***_initCallbackPre() functions. Those callbacks should also
|
||||
* trigger calling of CO_process() function.
|
||||
* See also @ref CO_CONFIG_FLAG_CALLBACK_PRE configuration macro.
|
||||
*
|
||||
* This is experimental feature and can be used for energy saving in case
|
||||
* of low traffic on CAN bus. Parameter is ignored if NULL.
|
||||
* trigger calling of CO_process() function. Parameter is ignored if
|
||||
* NULL. See also @ref CO_CONFIG_FLAG_CALLBACK_PRE configuration macro.
|
||||
*
|
||||
* @return #CO_NMT_reset_cmd_t from CO_NMT_process().
|
||||
*/
|
||||
|
|
@ -344,7 +356,7 @@ CO_NMT_reset_cmd_t CO_process(CO_t *co,
|
|||
* @param co CANopen object.
|
||||
* @param timeDifference_us Time difference from previous function call in
|
||||
* microseconds.
|
||||
* @param timerNext_us [out] info to OS - see CO_process().
|
||||
* @param [out] timerNext_us info to OS - see CO_process().
|
||||
*
|
||||
* @return True, if CANopen SYNC message was just received or transmitted.
|
||||
*/
|
||||
|
|
@ -378,7 +390,7 @@ void CO_process_RPDO(CO_t *co, bool_t syncWas);
|
|||
* transmitted.
|
||||
* @param timeDifference_us Time difference from previous function call in
|
||||
* microseconds.
|
||||
* @param timerNext_us [out] info to OS - see CO_process().
|
||||
* @param [out] timerNext_us info to OS - see CO_process().
|
||||
*/
|
||||
void CO_process_TPDO(CO_t *co,
|
||||
bool_t syncWas,
|
||||
|
|
|
|||
3
Doxyfile
3
Doxyfile
|
|
@ -785,6 +785,7 @@ INPUT = README.md \
|
|||
CANopen.h \
|
||||
301 \
|
||||
305 \
|
||||
309 \
|
||||
extra \
|
||||
socketCAN
|
||||
|
||||
|
|
@ -935,7 +936,7 @@ FILTER_SOURCE_PATTERNS =
|
|||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
USE_MDFILE_AS_MAINPAGE = README.md
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
html/md_README.html
|
||||
html/index.html
|
||||
|
|
@ -45,39 +45,67 @@ extern "C" {
|
|||
/* Stack configuration override from CO_driver.h. Compile full stack.
|
||||
* For more information see file CO_config.h. */
|
||||
#ifndef CO_CONFIG_NMT
|
||||
#define CO_CONFIG_NMT CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_NMT_CALLBACK_CHANGE | CO_CONFIG_NMT_MASTER | CO_CONFIG_NMT_LEDS
|
||||
#define CO_CONFIG_NMT (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_NMT_CALLBACK_CHANGE | \
|
||||
CO_CONFIG_NMT_MASTER | \
|
||||
CO_CONFIG_NMT_LEDS)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO
|
||||
#define CO_CONFIG_SDO CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_SDO_SEGMENTED | CO_CONFIG_SDO_BLOCK
|
||||
#define CO_CONFIG_SDO (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_SDO_SEGMENTED | \
|
||||
CO_CONFIG_SDO_BLOCK)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_BUFFER_SIZE
|
||||
#define CO_CONFIG_SDO_BUFFER_SIZE 889
|
||||
#define CO_CONFIG_SDO_BUFFER_SIZE 1800
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_EM
|
||||
#define CO_CONFIG_EM CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_EM_CONSUMER
|
||||
#define CO_CONFIG_EM (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_EM_CONSUMER)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_HB_CONS
|
||||
#define CO_CONFIG_HB_CONS CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_HB_CONS_CALLBACK_CHANGE | CO_CONFIG_HB_CONS_CALLBACK_MULTI | CO_CONFIG_HB_CONS_QUERY_FUNCT
|
||||
#define CO_CONFIG_HB_CONS (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_HB_CONS_CALLBACK_CHANGE | \
|
||||
CO_CONFIG_HB_CONS_CALLBACK_MULTI | \
|
||||
CO_CONFIG_HB_CONS_QUERY_FUNCT)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_PDO
|
||||
#define CO_CONFIG_PDO CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_PDO_SYNC_ENABLE
|
||||
#define CO_CONFIG_PDO (CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_PDO_SYNC_ENABLE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SYNC
|
||||
#define CO_CONFIG_SYNC CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SYNC (CO_CONFIG_FLAG_TIMERNEXT)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI
|
||||
#define CO_CONFIG_SDO_CLI CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SDO_CLI (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_SDO_CLI_SEGMENTED | \
|
||||
CO_CONFIG_SDO_CLI_BLOCK | \
|
||||
CO_CONFIG_SDO_CLI_LOCAL)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI_BUFFER_SIZE
|
||||
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE 1000
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_LSS_MST
|
||||
#define CO_CONFIG_LSS_MST CO_CONFIG_FLAG_CALLBACK_PRE
|
||||
#define CO_CONFIG_LSS_MST (CO_CONFIG_FLAG_CALLBACK_PRE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_GTW
|
||||
#define CO_CONFIG_GTW (CO_CONFIG_GTW_MULTI_NET | \
|
||||
CO_CONFIG_GTW_ASCII)
|
||||
#define CO_CONFIG_GTWA_COMM_BUF_SIZE 2000
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,39 +53,64 @@ extern "C" {
|
|||
/* Stack configuration override from CO_driver.h.
|
||||
* For more information see file CO_config.h. */
|
||||
#ifndef CO_CONFIG_NMT
|
||||
#define CO_CONFIG_NMT CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_NMT_CALLBACK_CHANGE | CO_CONFIG_NMT_MASTER | CO_CONFIG_NMT_LEDS
|
||||
#define CO_CONFIG_NMT (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_NMT_CALLBACK_CHANGE | \
|
||||
CO_CONFIG_NMT_MASTER | \
|
||||
CO_CONFIG_NMT_LEDS)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO
|
||||
#define CO_CONFIG_SDO CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_SDO_SEGMENTED | CO_CONFIG_SDO_BLOCK
|
||||
#define CO_CONFIG_SDO (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_SDO_SEGMENTED | \
|
||||
CO_CONFIG_SDO_BLOCK)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_BUFFER_SIZE
|
||||
#define CO_CONFIG_SDO_BUFFER_SIZE 889
|
||||
#define CO_CONFIG_SDO_BUFFER_SIZE 1800
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_EM
|
||||
#define CO_CONFIG_EM CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_EM_CONSUMER
|
||||
#define CO_CONFIG_EM (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_EM_CONSUMER)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_HB_CONS
|
||||
#define CO_CONFIG_HB_CONS CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_HB_CONS_CALLBACK_CHANGE
|
||||
#define CO_CONFIG_HB_CONS (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_HB_CONS_CALLBACK_CHANGE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_PDO
|
||||
#define CO_CONFIG_PDO CO_CONFIG_FLAG_TIMERNEXT | CO_CONFIG_PDO_SYNC_ENABLE
|
||||
#define CO_CONFIG_PDO (CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_PDO_SYNC_ENABLE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SYNC
|
||||
#define CO_CONFIG_SYNC CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SYNC (CO_CONFIG_FLAG_TIMERNEXT)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI
|
||||
#define CO_CONFIG_SDO_CLI CO_CONFIG_FLAG_CALLBACK_PRE | CO_CONFIG_FLAG_TIMERNEXT
|
||||
#define CO_CONFIG_SDO_CLI (CO_CONFIG_FLAG_CALLBACK_PRE | \
|
||||
CO_CONFIG_FLAG_TIMERNEXT | \
|
||||
CO_CONFIG_SDO_CLI_SEGMENTED | \
|
||||
CO_CONFIG_SDO_CLI_BLOCK | \
|
||||
CO_CONFIG_SDO_CLI_LOCAL)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_SDO_CLI_BUFFER_SIZE
|
||||
#define CO_CONFIG_SDO_CLI_BUFFER_SIZE 1000
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_LSS_MST
|
||||
#define CO_CONFIG_LSS_MST CO_CONFIG_FLAG_CALLBACK_PRE
|
||||
#define CO_CONFIG_LSS_MST (CO_CONFIG_FLAG_CALLBACK_PRE)
|
||||
#endif
|
||||
|
||||
#ifndef CO_CONFIG_GTW
|
||||
#define CO_CONFIG_GTW (CO_CONFIG_GTW_ASCII)
|
||||
#define CO_CONFIG_GTWA_COMM_BUF_SIZE 2000
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue