- config parser modified for complex pin type

This commit is contained in:
Sascha Ittner
2015-02-24 19:07:55 +01:00
parent 52c0f4679f
commit 6ef3290352
5 changed files with 164 additions and 16 deletions

View File

@@ -28,6 +28,9 @@
#define LCEC_CONF_STR_MAXLEN 32
#define LCEC_CONF_SDO_COMPLETE_SUBIDX -1
#define LCEC_CONF_GENERIC_MAX_SUBPINS 32
typedef enum {
lcecConfTypeNone,
lcecConfTypeMasters,
@@ -39,9 +42,17 @@ typedef enum {
lcecConfTypePdo,
lcecConfTypePdoEntry,
lcecConfTypeSdoConfig,
lcecConfTypeSdoDataRaw
lcecConfTypeSdoDataRaw,
lcecConfTypeComplexEntry
} LCEC_CONF_TYPE_T;
typedef enum {
lcecPdoEntTypeSimple,
lcecPdoEntTypeFloatSigned,
lcecPdoEntTypeFloatUnsigned,
lcecPdoEntTypeComplex
} LCEC_PDOENT_TYPE_T;
typedef enum {
lcecSlaveTypeInvalid,
lcecSlaveTypeGeneric,
@@ -174,8 +185,8 @@ typedef struct {
uint16_t index;
uint8_t subindex;
uint8_t bitLength;
LCEC_PDOENT_TYPE_T subType;
hal_type_t halType;
int floatUnsigned;
hal_float_t floatScale;
hal_float_t floatOffset;
char halPin[LCEC_CONF_STR_MAXLEN];
@@ -183,9 +194,17 @@ typedef struct {
typedef struct {
LCEC_CONF_TYPE_T confType;
} LCEC_CONF_NULL_T;
uint8_t bitLength;
LCEC_PDOENT_TYPE_T subType;
hal_type_t halType;
hal_float_t floatScale;
hal_float_t floatOffset;
char halPin[LCEC_CONF_STR_MAXLEN];
} LCEC_CONF_COMPLEXENTRY_T;
#define LCEC_CONF_SDO_COMPLETE_SUBIDX -1
typedef struct {
LCEC_CONF_TYPE_T confType;
} LCEC_CONF_NULL_T;
typedef struct {
LCEC_CONF_TYPE_T confType;