Lely core libraries
2.2.5
|
Go to the documentation of this file.
22 #ifndef LELY_CO_PDO_H_
23 #define LELY_CO_PDO_H_
28 #define CO_PDO_COBID_VALID UINT32_C(0x80000000)
31 #define CO_PDO_COBID_RTR UINT32_C(0x40000000)
37 #define CO_PDO_COBID_FRAME UINT32_C(0x20000000)
40 #define CO_DEFSTRUCT_PDO_COMM_PAR 0x0020
52 co_unsigned8_t reserved;
60 #define CO_PDO_COMM_PAR_INIT \
62 6, CO_PDO_COBID_VALID, 0, 0, 0, 0, 0 \
66 #define CO_DEFSTRUCT_PDO_MAP_PAR 0x0021
73 co_unsigned32_t
map[0x40];
78 #define CO_PDO_MAP_PAR_INIT \
82 0, 0, 0, 0, 0, 0, 0, 0, \
83 0, 0, 0, 0, 0, 0, 0, 0, \
84 0, 0, 0, 0, 0, 0, 0, 0, \
85 0, 0, 0, 0, 0, 0, 0, 0, \
86 0, 0, 0, 0, 0, 0, 0, 0, \
87 0, 0, 0, 0, 0, 0, 0, 0, \
88 0, 0, 0, 0, 0, 0, 0, 0, \
89 0, 0, 0, 0, 0, 0, 0, 0 \
112 co_unsigned8_t subidx);
171 co_unsigned8_t subidx);
235 const co_unsigned64_t *val, co_unsigned8_t n,
236 uint_least8_t *
buf,
size_t *pn);
255 const uint_least8_t *
buf,
size_t n, co_unsigned64_t *val,
297 #endif // !LELY_CO_PDO_H_
co_unsigned32_t co_dev_cfg_tpdo_comm(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_comm_par *par)
Configures the communication parameters of a Transmit-PDO service by updating CANopen object 1800 - 1...
co_unsigned8_t sync
SYNC start value.
co_unsigned32_t co_dev_cfg_tpdo(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_comm_par *comm, const struct co_pdo_map_par *map)
Configures the communication and parameters of a Transmit-PDO service.
co_unsigned8_t n
Highest sub-index supported.
co_unsigned32_t co_dev_cfg_rpdo(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_comm_par *comm, const struct co_pdo_map_par *map)
Configures the communication and parameters of a Receive-PDO service.
co_unsigned16_t event
Event timer.
co_unsigned32_t co_pdo_up(const struct co_pdo_map_par *par, const co_dev_t *dev, struct co_sdo_req *req, uint_least8_t *buf, size_t *pn)
Reads mapped PDO values from the object dictionary through a local SDO upload request.
co_unsigned32_t co_dev_cfg_rpdo_map(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_map_par *par)
Configures the mapping parameters of a Receive-PDO service by updating CANopen object 1600 - 17FF (RP...
A PDO communication parameter record.
co_unsigned8_t trans
Transmission type.
co_unsigned8_t n
Number of mapped objects in PDO.
A CANopen SDO upload/download request.
co_unsigned32_t co_dev_cfg_tpdo_map(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_map_par *par)
Configures the mapping parameters of a Transmit-PDO service by updating CANopen object 1A00 - 1BFF (T...
co_unsigned16_t inhibit
Inhibit time.
co_unsigned32_t co_pdo_map(const struct co_pdo_map_par *par, const co_unsigned64_t *val, co_unsigned8_t n, uint_least8_t *buf, size_t *pn)
Maps values into a PDO.
co_unsigned32_t co_dev_chk_rpdo(const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx)
Checks if the specified object is valid and can be mapped into a Receive-PDO.
const void * buf
A pointer to the next bytes to be uploaded/downloaded.
co_unsigned32_t co_dev_cfg_rpdo_comm(const co_dev_t *dev, co_unsigned16_t num, const struct co_pdo_comm_par *par)
Configures the communication parameters of a Receive-PDO service by updating CANopen object 1400 - 15...
co_unsigned32_t cobid
COB-ID.
co_unsigned32_t co_pdo_dn(const struct co_pdo_map_par *par, co_dev_t *dev, struct co_sdo_req *req, const uint_least8_t *buf, size_t n)
Writes mapped PDO values to the object dictionary through a local SDO download request.
co_unsigned32_t co_dev_chk_tpdo(const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx)
Checks if the specified object is valid and can be mapped into a Transmit-PDO.
A PDO mapping parameter record.
co_unsigned32_t map[0x40]
An array of objects to be mapped.
co_unsigned32_t co_pdo_unmap(const struct co_pdo_map_par *par, const uint_least8_t *buf, size_t n, co_unsigned64_t *val, co_unsigned8_t *pn)
Unmaps a PDO into its constituent values.