From b472aba95f7fbbfd61e9b8830dd30a4fe73af86f Mon Sep 17 00:00:00 2001 From: Thorsten Kummermehr Date: Wed, 26 Jul 2017 16:54:13 +0200 Subject: Implement handling of GPIO, I2C, Routes --- ucs2-interface/ucs_config.h | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'ucs2-interface/ucs_config.h') diff --git a/ucs2-interface/ucs_config.h b/ucs2-interface/ucs_config.h index 74c82c6..16210af 100644 --- a/ucs2-interface/ucs_config.h +++ b/ucs2-interface/ucs_config.h @@ -39,6 +39,7 @@ #define DEBUG_XRM #define BOARD_PMS_TX_SIZE (72) #define CMD_QUEUE_LEN (6) +#define I2C_WRITE_MAX_LEN (32) #include #include @@ -72,7 +73,10 @@ typedef enum UnicensCmd_Init, UnicensCmd_Stop, UnicensCmd_RmSetRoute, - UnicensCmd_NsRun + UnicensCmd_NsRun, + UnicensCmd_GpioCreatePort, + UnicensCmd_GpioWritePort, + UnicensCmd_I2CWrite } UnicensCmd_t; /** @@ -100,6 +104,39 @@ typedef struct Ucs_Rm_Node_t * node_ptr; } UnicensCmdNsRun_t; +/** + * \brief Internal struct for Unicens Integration + */ +typedef struct +{ + uint16_t destination; + uint16_t debounceTime; +} UnicensCmdGpioCreatePort_t; + +/** + * \brief Internal struct for Unicens Integration + */ +typedef struct +{ + uint16_t destination; + uint16_t mask; + uint16_t data; +} UnicensCmdGpioWritePort_t; + +/** + * \brief Internal struct for Unicens Integration + */ +typedef struct +{ + uint16_t destination; + bool isBurst; + uint8_t blockCount; + uint8_t slaveAddr; + uint16_t timeout; + uint8_t dataLen; + uint8_t data[I2C_WRITE_MAX_LEN]; +} UnicensCmdI2CWrite_t; + /** * \brief Internal struct for Unicens Integration */ @@ -111,6 +148,9 @@ typedef struct UnicensCmdInit_t Init; UnicensCmdRmSetRoute_t RmSetRoute; UnicensCmdNsRun_t NsRun; + UnicensCmdGpioCreatePort_t GpioCreatePort; + UnicensCmdGpioWritePort_t GpioWritePort; + UnicensCmdI2CWrite_t I2CWrite; } val; } UnicensCmdEntry_t; -- cgit 1.2.3-korg