Lely core libraries  2.2.5
pdo.c
Go to the documentation of this file.
1 
24 #include "co.h"
25 
26 #include <lely/can/msg.h>
27 #include <lely/co/dev.h>
28 #include <lely/co/obj.h>
29 #include <lely/co/pdo.h>
30 #include <lely/co/sdo.h>
31 #include <lely/util/endian.h>
32 
33 #include <assert.h>
34 
35 static co_unsigned32_t co_dev_cfg_pdo_comm(const co_dev_t *dev,
36  co_unsigned16_t idx, const struct co_pdo_comm_par *par);
37 
38 static co_unsigned32_t co_dev_cfg_pdo_map(const co_dev_t *dev,
39  co_unsigned16_t num, const struct co_pdo_map_par *par);
40 
41 co_unsigned32_t
42 co_dev_chk_rpdo(const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx)
43 {
44  assert(dev);
45 
46  if (co_type_is_basic(idx) && !subidx) {
47  // If the object is a dummy entry, check if it is enabled.
48  if (!(co_dev_get_dummy(dev) & (1 << idx)))
49  return CO_SDO_AC_NO_OBJ;
50  } else {
51  co_obj_t *obj = co_dev_find_obj(dev, idx);
52  if (!obj)
53  return CO_SDO_AC_NO_OBJ;
54 
55  co_sub_t *sub = co_obj_find_sub(obj, subidx);
56  if (!sub)
57  return CO_SDO_AC_NO_SUB;
58 
59  unsigned int access = co_sub_get_access(sub);
60  if (!(access & CO_ACCESS_WRITE))
61  return CO_SDO_AC_NO_WRITE;
62 
63  if (!co_sub_get_pdo_mapping(sub) || !(access & CO_ACCESS_RPDO))
64  return CO_SDO_AC_NO_PDO;
65  }
66 
67  return 0;
68 }
69 
70 co_unsigned32_t
71 co_dev_cfg_rpdo(const co_dev_t *dev, co_unsigned16_t num,
72  const struct co_pdo_comm_par *comm,
73  const struct co_pdo_map_par *map)
74 {
75  assert(comm);
76 
77  co_unsigned32_t ac = 0;
78 
79  struct co_pdo_comm_par par = *comm;
80  // Disable the RPDO service before configuring any parameters.
82  ac = co_dev_cfg_rpdo_comm(dev, num, &par);
83  if (ac)
84  return ac;
85 
86  ac = co_dev_cfg_rpdo_map(dev, num, map);
87  if (ac)
88  return ac;
89 
90  // Re-enable the RPDO service if necessary.
91  if (!(comm->cobid & CO_PDO_COBID_VALID))
92  ac = co_dev_cfg_rpdo_comm(dev, num, comm);
93  return ac;
94 }
95 
96 co_unsigned32_t
97 co_dev_cfg_rpdo_comm(const co_dev_t *dev, co_unsigned16_t num,
98  const struct co_pdo_comm_par *par)
99 {
100  if (!num || num > 512)
101  return CO_SDO_AC_NO_OBJ;
102 
103  return co_dev_cfg_pdo_comm(dev, 0x1400 + num - 1, par);
104 }
105 
106 co_unsigned32_t
107 co_dev_cfg_rpdo_map(const co_dev_t *dev, co_unsigned16_t num,
108  const struct co_pdo_map_par *par)
109 {
110  if (!num || num > 512)
111  return CO_SDO_AC_NO_OBJ;
112 
113  return co_dev_cfg_pdo_map(dev, 0x1600 + num - 1, par);
114 }
115 
116 co_unsigned32_t
117 co_dev_chk_tpdo(const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx)
118 {
119  assert(dev);
120 
121  co_obj_t *obj = co_dev_find_obj(dev, idx);
122  if (!obj)
123  return CO_SDO_AC_NO_OBJ;
124 
125  co_sub_t *sub = co_obj_find_sub(obj, subidx);
126  if (!sub)
127  return CO_SDO_AC_NO_SUB;
128 
129  unsigned int access = co_sub_get_access(sub);
130  if (!(access & CO_ACCESS_READ))
131  return CO_SDO_AC_NO_READ;
132 
133  if (!co_sub_get_pdo_mapping(sub) || !(access & CO_ACCESS_TPDO))
134  return CO_SDO_AC_NO_PDO;
135 
136  return 0;
137 }
138 
139 co_unsigned32_t
140 co_dev_cfg_tpdo(const co_dev_t *dev, co_unsigned16_t num,
141  const struct co_pdo_comm_par *comm,
142  const struct co_pdo_map_par *map)
143 {
144  assert(comm);
145 
146  co_unsigned32_t ac = 0;
147 
148  struct co_pdo_comm_par par = *comm;
149  // Disable the TPDO service before configuring any parameters.
150  par.cobid |= CO_PDO_COBID_VALID;
151  ac = co_dev_cfg_tpdo_comm(dev, num, &par);
152  if (ac)
153  return ac;
154 
155  ac = co_dev_cfg_tpdo_map(dev, num, map);
156  if (ac)
157  return ac;
158 
159  // Re-enable the TPDO service if necessary.
160  if (!(comm->cobid & CO_PDO_COBID_VALID))
161  ac = co_dev_cfg_tpdo_comm(dev, num, comm);
162  return ac;
163 }
164 
165 co_unsigned32_t
166 co_dev_cfg_tpdo_comm(const co_dev_t *dev, co_unsigned16_t num,
167  const struct co_pdo_comm_par *par)
168 {
169  if (!num || num > 512)
170  return CO_SDO_AC_NO_OBJ;
171 
172  return co_dev_cfg_pdo_comm(dev, 0x1800 + num - 1, par);
173 }
174 
175 co_unsigned32_t
176 co_dev_cfg_tpdo_map(const co_dev_t *dev, co_unsigned16_t num,
177  const struct co_pdo_map_par *par)
178 {
179  if (!num || num > 512)
180  return CO_SDO_AC_NO_OBJ;
181 
182  return co_dev_cfg_pdo_map(dev, 0x1a00 + num - 1, par);
183 }
184 
185 co_unsigned32_t
186 co_pdo_map(const struct co_pdo_map_par *par, const co_unsigned64_t *val,
187  co_unsigned8_t n, uint_least8_t *buf, size_t *pn)
188 {
189  assert(par);
190  assert(val);
191 
192  if (par->n > 0x40 || n != par->n)
193  return CO_SDO_AC_PDO_LEN;
194 
195  size_t offset = 0;
196  for (size_t i = 0; i < par->n; i++) {
197  co_unsigned32_t map = par->map[i];
198  if (!map)
199  continue;
200 
201  co_unsigned8_t len = map & 0xff;
202  if (offset + len > CAN_MAX_LEN * 8)
203  return CO_SDO_AC_PDO_LEN;
204 
205  uint_least8_t tmp[sizeof(co_unsigned64_t)] = { 0 };
206  stle_u64(tmp, val[i]);
207  if (buf && pn && offset + len <= *pn * 8)
208  bcpyle(buf, offset, tmp, 0, len);
209 
210  offset += len;
211  }
212 
213  if (pn)
214  *pn = (offset + 7) / 8;
215 
216  return 0;
217 }
218 
219 co_unsigned32_t
220 co_pdo_unmap(const struct co_pdo_map_par *par, const uint_least8_t *buf,
221  size_t n, co_unsigned64_t *val, co_unsigned8_t *pn)
222 {
223  assert(par);
224  assert(buf);
225 
226  if (par->n > 0x40)
227  return CO_SDO_AC_PDO_LEN;
228 
229  size_t offset = 0;
230  for (size_t i = 0; i < par->n; i++) {
231  co_unsigned32_t map = par->map[i];
232  if (!map)
233  continue;
234 
235  co_unsigned8_t len = map & 0xff;
236  if (offset + len > n * 8)
237  return CO_SDO_AC_PDO_LEN;
238 
239  uint_least8_t tmp[sizeof(co_unsigned64_t)] = { 0 };
240  bcpyle(tmp, 0, buf, offset, len);
241  if (val && pn && i < *pn)
242  val[i] = ldle_u64(tmp);
243 
244  offset += len;
245  }
246 
247  if (pn)
248  *pn = par->n;
249 
250  return 0;
251 }
252 
253 co_unsigned32_t
254 co_pdo_dn(const struct co_pdo_map_par *par, co_dev_t *dev,
255  struct co_sdo_req *req, const uint_least8_t *buf, size_t n)
256 {
257  assert(par);
258  assert(dev);
259  assert(req);
260  assert(buf);
261 
262  if (n > CAN_MAX_LEN)
263  return CO_SDO_AC_PDO_LEN;
264 
265  co_unsigned32_t ac = 0;
266 
267  size_t offset = 0;
268  for (size_t i = 0; i < MIN(par->n, 0x40u); i++) {
269  co_unsigned32_t map = par->map[i];
270  if (!map)
271  continue;
272 
273  co_unsigned16_t idx = (map >> 16) & 0xffff;
274  co_unsigned8_t subidx = (map >> 8) & 0xff;
275  co_unsigned8_t len = map & 0xff;
276 
277  // Check the PDO length.
278  if (offset + len > n * 8)
279  return CO_SDO_AC_PDO_LEN;
280 
281  // Check whether the sub-object exists and can be mapped into a
282  // PDO (or is a valid dummy entry).
283  ac = co_dev_chk_rpdo(dev, idx, subidx);
284  if (ac)
285  return ac;
286 
287  co_sub_t *sub = co_dev_find_sub(dev, idx, subidx);
288  if (sub) {
289  // Copy the value and download it into the sub-object.
290  uint_least8_t tmp[CAN_MAX_LEN] = { 0 };
291  bcpyle(tmp, 0, buf, offset, len);
292  co_sdo_req_clear(req);
293  req->size = (len + 7) / 8;
294  req->buf = tmp;
295  req->nbyte = req->size;
296  ac = co_sub_dn_ind(sub, req);
297  if (ac)
298  return ac;
299  }
300 
301  offset += len;
302  }
303 
304  return ac;
305 }
306 
307 co_unsigned32_t
308 co_pdo_up(const struct co_pdo_map_par *par, const co_dev_t *dev,
309  struct co_sdo_req *req, uint_least8_t *buf, size_t *pn)
310 {
311  assert(par);
312  assert(dev);
313  assert(req);
314 
315  co_unsigned32_t ac = 0;
316 
317  size_t offset = 0;
318  for (size_t i = 0; i < MIN(par->n, 0x40u); i++) {
319  co_unsigned32_t map = par->map[i];
320  if (!map)
321  continue;
322 
323  co_unsigned16_t idx = (map >> 16) & 0xffff;
324  co_unsigned8_t subidx = (map >> 8) & 0xff;
325  co_unsigned8_t len = map & 0xff;
326 
327  // Check the PDO length.
328  if (offset + len > CAN_MAX_LEN * 8)
329  return CO_SDO_AC_PDO_LEN;
330 
331  // Check whether the sub-object exists and can be mapped into a
332  // PDO.
333  ac = co_dev_chk_tpdo(dev, idx, subidx);
334  if (ac)
335  return ac;
336 
337  // Upload the value of the sub-object and copy the value.
338  co_sdo_req_clear(req);
339  ac = co_sub_up_ind(co_dev_find_sub(dev, idx, subidx), req);
340  if (ac)
341  return ac;
342  if (!co_sdo_req_first(req) || !co_sdo_req_last(req))
343  return CO_SDO_AC_PDO_LEN;
344  if (buf && pn && offset + len <= *pn * 8)
345  bcpyle(buf, offset, req->buf, 0, len);
346 
347  offset += len;
348  }
349 
350  if (pn)
351  *pn = (offset + 7) / 8;
352 
353  return ac;
354 }
355 
356 static co_unsigned32_t
357 co_dev_cfg_pdo_comm(const co_dev_t *dev, co_unsigned16_t idx,
358  const struct co_pdo_comm_par *par)
359 {
360  assert(dev);
361  assert(par);
362 
363  co_unsigned32_t ac = 0;
364 
365  co_obj_t *obj = co_dev_find_obj(dev, idx);
366  if (!obj)
367  return CO_SDO_AC_NO_OBJ;
368 
369  // Check if all sub-objects are available.
370  co_unsigned8_t n = co_obj_get_val_u8(obj, 0x00);
371  if (par->n > n)
372  return CO_SDO_AC_NO_SUB;
373 
374  // Configure the COB-ID.
375  if (par->n >= 1 && !ac) {
376  co_sub_t *sub = co_obj_find_sub(obj, 0x01);
377  if (!sub)
378  return CO_SDO_AC_NO_SUB;
380  }
381 
382  // Configure the transmission type.
383  if (par->n >= 2 && !ac) {
384  co_sub_t *sub = co_obj_find_sub(obj, 0x02);
385  if (!sub)
386  return CO_SDO_AC_NO_SUB;
387  ac = co_sub_dn_ind_val(sub, CO_DEFTYPE_UNSIGNED8, &par->trans);
388  }
389 
390  // Configure the inhibit time.
391  if (par->n >= 3 && !ac) {
392  co_sub_t *sub = co_obj_find_sub(obj, 0x03);
393  if (!sub)
394  return CO_SDO_AC_NO_SUB;
395  ac = co_sub_dn_ind_val(
396  sub, CO_DEFTYPE_UNSIGNED16, &par->inhibit);
397  }
398 
399  // Configure the event timer.
400  if (par->n >= 5 && !ac) {
401  co_sub_t *sub = co_obj_find_sub(obj, 0x05);
402  if (!sub)
403  return CO_SDO_AC_NO_SUB;
405  }
406 
407  // Configure the SYNC start value.
408  if (par->n >= 6 && !ac) {
409  co_sub_t *sub = co_obj_find_sub(obj, 0x06);
410  if (!sub)
411  return CO_SDO_AC_NO_SUB;
412  ac = co_sub_dn_ind_val(sub, CO_DEFTYPE_UNSIGNED8, &par->sync);
413  }
414 
415  return ac;
416 }
417 
418 static co_unsigned32_t
419 co_dev_cfg_pdo_map(const co_dev_t *dev, co_unsigned16_t idx,
420  const struct co_pdo_map_par *par)
421 {
422  assert(dev);
423  assert(par);
424 
425  co_unsigned32_t ac = 0;
426 
427  co_obj_t *obj = co_dev_find_obj(dev, idx);
428  if (!obj)
429  return CO_SDO_AC_NO_OBJ;
430 
431  co_sub_t *sub_00 = co_obj_find_sub(obj, 0x00);
432  if (!sub_00)
433  return CO_SDO_AC_NO_SUB;
434  // Disable mapping by setting subindex 0x00 to zero.
435  ac = co_sub_dn_ind_val(
436  sub_00, CO_DEFTYPE_UNSIGNED8, &(co_unsigned8_t){ 0 });
437  if (ac)
438  return ac;
439 
440  // Copy the mapping parameters.
441  for (co_unsigned8_t i = 1; i <= par->n; i++) {
442  co_sub_t *sub = co_obj_find_sub(obj, i);
443  if (!sub)
444  return CO_SDO_AC_NO_SUB;
445  ac = co_sub_dn_ind_val(
446  sub, CO_DEFTYPE_UNSIGNED32, &par->map[i - 1]);
447  if (ac)
448  return ac;
449  }
450 
451  // Enable mapping.
452  return co_sub_dn_ind_val(sub_00, CO_DEFTYPE_UNSIGNED8, &par->n);
453 }
This header file is part of the CAN library; it contains the CAN frame declarations.
#define CAN_MAX_LEN
The maximum number of bytes in the payload of a CAN format frame.
Definition: msg.h:72
This header file is part of the CANopen library; it contains the device description declarations.
co_sub_t * co_dev_find_sub(const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx)
Finds a sub-object in the object dictionary of a CANopen device.
Definition: dev.c:299
co_unsigned32_t co_dev_get_dummy(const co_dev_t *dev)
Returns the data types supported by a CANopen device for mapping dummy entries in PDOs (one bit for e...
Definition: dev.c:540
co_obj_t * co_dev_find_obj(const co_dev_t *dev, co_unsigned16_t idx)
Finds an object in the object dictionary of a CANopen device.
Definition: dev.c:288
This header file is part of the utilities library; it contains the byte order (endianness) function d...
void stle_u64(uint_least8_t dst[8], uint_least64_t x)
Stores a 64-bit unsigned integer in little-endian byte order.
Definition: endian.h:662
void bcpyle(uint_least8_t *dst, int dstbit, const uint_least8_t *src, int srcbit, size_t n)
Copies n bits from a source to a destination buffer.
Definition: endian.c:123
uint_least64_t ldle_u64(const uint_least8_t src[8])
Loads a 64-bit unsigned integer in little-endian byte order.
Definition: endian.h:680
This header file is part of the CANopen library; it contains the object dictionary declarations.
#define CO_ACCESS_READ
The object can be read.
Definition: obj.h:57
co_unsigned32_t co_sub_dn_ind(co_sub_t *sub, struct co_sdo_req *req)
Invokes the download indication function of a CANopen sub-object, registered with co_sub_set_dn_ind()...
Definition: obj.c:916
co_unsigned32_t co_sub_up_ind(const co_sub_t *sub, struct co_sdo_req *req)
Invokes the upload indication function of a CANopen sub-object, registered with co_sub_set_up_ind().
Definition: obj.c:1019
co_unsigned32_t co_sub_dn_ind_val(co_sub_t *sub, co_unsigned16_t type, const void *val)
Invokes the download indication function of a CANopen sub-object, registered with co_sub_set_dn_ind()...
Definition: obj.c:932
#define CO_ACCESS_RPDO
The object can be mapped to an RPDO.
Definition: obj.h:66
int co_sub_get_pdo_mapping(const co_sub_t *sub)
Returns 1 if it is possible to map the specified CANopen sub-object into a PDO, and 0 if not.
Definition: obj.c:769
co_sub_t * co_obj_find_sub(const co_obj_t *obj, co_unsigned8_t subidx)
Finds a sub-object in a CANopen object.
Definition: obj.c:225
#define CO_ACCESS_TPDO
The object can be mapped to a TPDO.
Definition: obj.h:63
#define CO_ACCESS_WRITE
The object can be written.
Definition: obj.h:60
unsigned int co_sub_get_access(const co_sub_t *sub)
Returns the access type of a CANopen sub-object.
Definition: obj.c:745
This header file is part of the CANopen library; it contains the Service Data Object (SDO) declaratio...
int co_sdo_req_first(const struct co_sdo_req *req)
Returns 1 if the specified request includes the first segment, and 0 otherwise.
Definition: sdo.h:340
#define CO_SDO_AC_NO_READ
SDO abort code: Attempt to read a write only object.
Definition: sdo.h:87
#define CO_SDO_AC_NO_OBJ
SDO abort code: Object does not exist in the object dictionary.
Definition: sdo.h:93
void co_sdo_req_clear(struct co_sdo_req *req)
Clears a CANopen SDO upload/download request, including its buffer.
Definition: sdo.c:129
#define CO_SDO_AC_NO_SUB
SDO abort code: Sub-index does not exist.
Definition: sdo.h:132
int co_sdo_req_last(const struct co_sdo_req *req)
Returns 1 if the specified request includes the last segment, and 0 otherwise.
Definition: sdo.h:346
#define CO_SDO_AC_PDO_LEN
SDO abort code: The number and length of the objects to be mapped would exceed the PDO length.
Definition: sdo.h:102
#define CO_SDO_AC_NO_PDO
SDO abort code: Object cannot be mapped to the PDO.
Definition: sdo.h:96
#define CO_SDO_AC_NO_WRITE
SDO abort code: Attempt to write a read only object.
Definition: sdo.h:90
#define MIN(a, b)
Returns the minimum of a and b.
Definition: util.h:57
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.
Definition: pdo.c:220
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.
Definition: pdo.c:42
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...
Definition: pdo.c:97
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...
Definition: pdo.c:166
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.
Definition: pdo.c:71
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.
Definition: pdo.c:140
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.
Definition: pdo.c:117
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.
Definition: pdo.c:254
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.
Definition: pdo.c:186
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.
Definition: pdo.c:308
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...
Definition: pdo.c:176
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...
Definition: pdo.c:107
This header file is part of the CANopen library; it contains the Process Data Object (PDO) declaratio...
#define CO_PDO_COBID_VALID
The bit in the PDO COB-ID specifying whether the PDO exists and is valid.
Definition: pdo.h:28
This is the internal header file of the CANopen library.
A CANopen device.
Definition: dev.c:41
A CANopen object.
Definition: obj.h:32
A CANopen sub-object.
Definition: obj.h:54
A PDO communication parameter record.
Definition: pdo.h:43
co_unsigned8_t sync
SYNC start value.
Definition: pdo.h:56
co_unsigned16_t inhibit
Inhibit time.
Definition: pdo.h:51
co_unsigned16_t event
Event timer.
Definition: pdo.h:54
co_unsigned32_t cobid
COB-ID.
Definition: pdo.h:47
co_unsigned8_t trans
Transmission type.
Definition: pdo.h:49
co_unsigned8_t n
Highest sub-index supported.
Definition: pdo.h:45
A PDO mapping parameter record.
Definition: pdo.h:69
co_unsigned8_t n
Number of mapped objects in PDO.
Definition: pdo.h:71
co_unsigned32_t map[0x40]
An array of objects to be mapped.
Definition: pdo.h:73
A CANopen SDO upload/download request.
Definition: sdo.h:178
size_t size
The total size (in bytes) of the value to be uploaded/downloaded.
Definition: sdo.h:184
const void * buf
A pointer to the next bytes to be uploaded/downloaded.
Definition: sdo.h:186
size_t nbyte
The number of bytes available at buf.
Definition: sdo.h:188
#define CO_DEFTYPE_UNSIGNED16
The data type (and object index) of a 16-bit unsigned integer.
Definition: type.h:47
#define CO_DEFTYPE_UNSIGNED8
The data type (and object index) of an 8-bit unsigned integer.
Definition: type.h:44
#define CO_DEFTYPE_UNSIGNED32
The data type (and object index) of a 32-bit unsigned integer.
Definition: type.h:50
int co_type_is_basic(co_unsigned16_t type)
Returns 1 if the specified (static) data type is a basic type, and 0 if not.
Definition: type.c:28