22 #ifndef LELY_CO_SYNC_H_
23 #define LELY_CO_SYNC_H_
29 #define CO_SYNC_COBID_PRODUCER UINT32_C(0x40000000)
35 #define CO_SYNC_COBID_FRAME UINT32_C(0x20000000)
61 co_unsigned8_t er,
void *data);
63 void *__co_sync_alloc(
void);
64 void __co_sync_free(
void *ptr);
67 void __co_sync_fini(
struct __co_sync *sync);
This header file is part of the CAN library; it contains the CAN network interface declarations.
A CANopen SYNC producer/consumer service.
can_net_t * net
A pointer to a CAN network interface.
co_sync_err_t * err
A pointer to the error handling function.
co_sync_ind_t * ind
A pointer to the indication function.
co_dev_t * dev
A pointer to a CANopen device.
void co_sync_get_err(const co_sync_t *sync, co_sync_err_t **perr, void **pdata)
Retrieves the error handling function of a SYNC consumer service.
void co_sync_destroy(co_sync_t *sync)
Destroys a CANopen SYNC producer/consumer service.
void co_sync_err_t(co_sync_t *sync, co_unsigned16_t eec, co_unsigned8_t er, void *data)
The type of a CANopen SYNC error handling function, invoked when the SYNC data length does not match.
void co_sync_set_err(co_sync_t *sync, co_sync_err_t *err, void *data)
Sets the error handling function of a SYNC consumer service.
void co_sync_set_ind(co_sync_t *sync, co_sync_ind_t *ind, void *data)
Sets the indication function invoked after a CANopen SYNC message is received or transmitted.
co_dev_t * co_sync_get_dev(const co_sync_t *sync)
Returns a pointer to the CANopen device of a SYNC producer/consumer service.
co_sync_t * co_sync_create(can_net_t *net, co_dev_t *dev)
Creates a new CANopen SYNC producer/consumer service.
void co_sync_ind_t(co_sync_t *sync, co_unsigned8_t cnt, void *data)
The type of a CANopen SYNC indication function, invoked after a SYNC message is received or transmitt...
can_net_t * co_sync_get_net(const co_sync_t *sync)
Returns a pointer to the CAN network of a SYNC producer/consumer service.
void co_sync_get_ind(const co_sync_t *sync, co_sync_ind_t **pind, void **pdata)
Retrieves the indication function invoked after a CANopen SYNC message is received or transmitted.
This header file is part of the CANopen library; it contains the CANopen type definitions.