Add data types BITARR8/16/32
Change-Id: Id8c75ff095cdee5d167df33ab3a80912a325adc7pull/80/head
parent
6eedcb7cdf
commit
78871af81b
|
@ -1496,17 +1496,20 @@ static uint64_t COE_getValue (const _objd * obj)
|
|||
case DTYPE_BOOLEAN:
|
||||
case DTYPE_UNSIGNED8:
|
||||
case DTYPE_INTEGER8:
|
||||
case DTYPE_BITARR8:
|
||||
value = *(uint8_t *)obj->data;
|
||||
break;
|
||||
|
||||
case DTYPE_UNSIGNED16:
|
||||
case DTYPE_INTEGER16:
|
||||
case DTYPE_BITARR16:
|
||||
value = *(uint16_t *)obj->data;
|
||||
break;
|
||||
|
||||
case DTYPE_REAL32:
|
||||
case DTYPE_UNSIGNED32:
|
||||
case DTYPE_INTEGER32:
|
||||
case DTYPE_BITARR32:
|
||||
value = *(uint32_t *)obj->data;
|
||||
break;
|
||||
|
||||
|
@ -1547,17 +1550,20 @@ static void COE_setValue (const _objd * obj, uint64_t value)
|
|||
case DTYPE_BOOLEAN:
|
||||
case DTYPE_UNSIGNED8:
|
||||
case DTYPE_INTEGER8:
|
||||
case DTYPE_BITARR8:
|
||||
*(uint8_t *)obj->data = value & UINT8_MAX;
|
||||
break;
|
||||
|
||||
case DTYPE_UNSIGNED16:
|
||||
case DTYPE_INTEGER16:
|
||||
case DTYPE_BITARR16:
|
||||
*(uint16_t *)obj->data = value & UINT16_MAX;
|
||||
break;
|
||||
|
||||
case DTYPE_REAL32:
|
||||
case DTYPE_UNSIGNED32:
|
||||
case DTYPE_INTEGER32:
|
||||
case DTYPE_BITARR32:
|
||||
*(uint32_t *)obj->data = value & UINT32_MAX;
|
||||
break;
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ typedef struct
|
|||
#define DTYPE_REAL64 0x0011
|
||||
#define DTYPE_PDO_MAPPING 0x0021
|
||||
#define DTYPE_IDENTITY 0x0023
|
||||
#define DTYPE_BITARR8 0x002D
|
||||
#define DTYPE_BITARR16 0x002E
|
||||
#define DTYPE_BITARR32 0x002F
|
||||
#define DTYPE_BIT1 0x0030
|
||||
#define DTYPE_BIT2 0x0031
|
||||
#define DTYPE_BIT3 0x0032
|
||||
|
|
Loading…
Reference in New Issue