1
0
Fork 0

OD getters/setters fix previous commit, issue #273

This commit is contained in:
Janez 2021-03-12 21:01:44 +01:00
parent 86d467a192
commit f6d33cdf29

View file

@ -541,70 +541,70 @@ ODR_t OD_get_value(const OD_entry_t *entry, uint8_t subIndex,
static inline ODR_t OD_get_i8(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_i8(const OD_entry_t *entry, uint8_t subIndex,
int8_t *val, bool_t odOrig) int8_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get int16_t variable from Object Dictionary, see @ref OD_get_value */ /** Get int16_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_i16(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_i16(const OD_entry_t *entry, uint8_t subIndex,
int16_t *val, bool_t odOrig) int16_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get int32_t variable from Object Dictionary, see @ref OD_get_value */ /** Get int32_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_i32(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_i32(const OD_entry_t *entry, uint8_t subIndex,
int32_t *val, bool_t odOrig) int32_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get int64_t variable from Object Dictionary, see @ref OD_get_value */ /** Get int64_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_i64(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_i64(const OD_entry_t *entry, uint8_t subIndex,
int64_t *val, bool_t odOrig) int64_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get uint8_t variable from Object Dictionary, see @ref OD_get_value */ /** Get uint8_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_u8(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_u8(const OD_entry_t *entry, uint8_t subIndex,
uint8_t *val, bool_t odOrig) uint8_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get uint16_t variable from Object Dictionary, see @ref OD_get_value */ /** Get uint16_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_u16(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_u16(const OD_entry_t *entry, uint8_t subIndex,
uint16_t *val, bool_t odOrig) uint16_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get uint32_t variable from Object Dictionary, see @ref OD_get_value */ /** Get uint32_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_u32(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_u32(const OD_entry_t *entry, uint8_t subIndex,
uint32_t *val, bool_t odOrig) uint32_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get uint64_t variable from Object Dictionary, see @ref OD_get_value */ /** Get uint64_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_u64(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_u64(const OD_entry_t *entry, uint8_t subIndex,
uint64_t *val, bool_t odOrig) uint64_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get float32_t variable from Object Dictionary, see @ref OD_get_value */ /** Get float32_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_f32(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_f32(const OD_entry_t *entry, uint8_t subIndex,
float32_t *val, bool_t odOrig) float32_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** Get float64_t variable from Object Dictionary, see @ref OD_get_value */ /** Get float64_t variable from Object Dictionary, see @ref OD_get_value */
static inline ODR_t OD_get_f64(const OD_entry_t *entry, uint8_t subIndex, static inline ODR_t OD_get_f64(const OD_entry_t *entry, uint8_t subIndex,
float64_t *val, bool_t odOrig) float64_t *val, bool_t odOrig)
{ {
return OD_get_value(entry, subIndex, val, sizeof(val), odOrig); return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
} }
/** /**