X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=ucs2-interface%2Fucs_config.h;h=0a47ae41d4b1254f800deec9d796a53048eb18f3;hb=66d34f291e0456f4c7a69b7f11a4678824287241;hp=16210aff299a8a77a43e1cb67ec06b6db6605f79;hpb=b472aba95f7fbbfd61e9b8830dd30a4fe73af86f;p=apps%2Fagl-service-unicens.git diff --git a/ucs2-interface/ucs_config.h b/ucs2-interface/ucs_config.h index 16210af..0a47ae4 100644 --- a/ucs2-interface/ucs_config.h +++ b/ucs2-interface/ucs_config.h @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------------------------------*/ -/* Unicens Integration Helper Component */ +/* UNICENS Integration Helper Component */ /* Copyright 2017, Microchip Technology Inc. and its subsidiaries. */ /* */ /* Redistribution and use in source and binary forms, with or without */ @@ -38,7 +38,7 @@ #define ENABLE_AMS_LIB (true) #define DEBUG_XRM #define BOARD_PMS_TX_SIZE (72) -#define CMD_QUEUE_LEN (6) +#define CMD_QUEUE_LEN (40) #define I2C_WRITE_MAX_LEN (32) #include @@ -52,7 +52,7 @@ /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ /** - * \brief Internal enum for Unicens Integration + * \brief Internal enum for UNICENS Integration */ typedef enum { @@ -65,7 +65,15 @@ typedef enum } UnicensCmdResult_t; /** - * \brief Internal enum for Unicens Integration + * \brief Asynchronous callback notifiying a command result + * \param result_ptr The asynchronous result of the command + * \param request_ptr User reference, typically points to the afb_req + * object. + */ +typedef void (*Ucsi_ResultCb_t)(void *result_ptr, void *request_ptr); + +/** + * \brief Internal enum for UNICENS Integration */ typedef enum { @@ -80,7 +88,7 @@ typedef enum } UnicensCmd_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -88,7 +96,7 @@ typedef struct } UnicensCmdInit_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -97,7 +105,7 @@ typedef struct } UnicensCmdRmSetRoute_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -105,7 +113,7 @@ typedef struct } UnicensCmdNsRun_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -114,7 +122,7 @@ typedef struct } UnicensCmdGpioCreatePort_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -124,7 +132,7 @@ typedef struct } UnicensCmdGpioWritePort_t; /** - * \brief Internal struct for Unicens Integration + * \brief Internal struct for UNICENS Integration */ typedef struct { @@ -135,6 +143,10 @@ typedef struct uint16_t timeout; uint8_t dataLen; uint8_t data[I2C_WRITE_MAX_LEN]; + + Ucsi_ResultCb_t result_fptr; + void *request_ptr; + } UnicensCmdI2CWrite_t; /** @@ -155,7 +167,7 @@ typedef struct } UnicensCmdEntry_t; /** - * \brief Internal variables for one instance of Unicens Integration + * \brief Internal variables for one instance of UNICENS Integration * \note Never touch any of this fields! */ typedef struct { @@ -169,7 +181,7 @@ typedef struct { } RB_t; /** - * \brief Internal variables for one instance of Unicens Integration + * \brief Internal variables for one instance of UNICENS Integration * \note Allocate this structure for each instance (static or malloc) * and pass it to UCSI_Init() * \note Never touch any of this fields!