2 * Unicens Integration Helper Component
4 * Copyright (C) 2017 Microchip Technology Germany II GmbH & Co. KG
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * You may also obtain this software under a propriety license from Microchip.
20 * Please contact Microchip for further information.
23 #ifndef UNICENSINTEGRATION_H_
24 #define UNICENSINTEGRATION_H_
26 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
27 /* USER ADJUSTABLE VALUES */
28 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
30 #define ENABLE_INIC_WATCHDOG (false)
31 #define ENABLE_AMS_LIB (true)
33 #define BOARD_PMS_TX_SIZE (72)
34 #define CMD_QUEUE_LEN (4)
42 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
44 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
47 * \brief Internal enum for Unicens Integration
51 ///Result is OK and the processing is finished. Safe to dequeue this command.
52 UniCmdResult_OK_ProcessFinished,
53 ///Result is OK but the processing is ongoing. Must wait for callback.
54 UniCmdResult_OK_NeedToWaitForCB,
55 ///Result is error and the processing is finished. Safe to dequeue this command.
56 UniCmdResult_ERROR_ProcessFinished
60 * \brief Internal enum for Unicens Integration
67 UnicensCmd_RmSetRoute,
72 * \brief Internal struct for Unicens Integration
76 const Ucs_InitData_t *init_ptr;
80 * \brief Internal struct for Unicens Integration
84 Ucs_Rm_Route_t *routePtr;
86 } UnicensCmdRmSetRoute_t;
89 * \brief Internal struct for Unicens Integration
93 Ucs_Rm_Node_t * node_ptr;
97 * \brief Internal struct for Unicens Integration
104 UnicensCmdInit_t Init;
105 UnicensCmdRmSetRoute_t RmSetRoute;
106 UnicensCmdNsRun_t NsRun;
111 * \brief Internal variables for one instance of Unicens Integration
112 * \note Never touch any of this fields!
115 volatile uint8_t *dataQueue;
116 volatile uint8_t *pRx;
117 volatile uint8_t *pTx;
118 volatile uint32_t amountOfEntries;
119 volatile uint32_t sizeOfEntry;
120 volatile uint32_t rxPos;
121 volatile uint32_t txPos;
125 * \brief Internal variables for one instance of Unicens Integration
126 * \note Allocate this structure for each instance (static or malloc)
127 * and pass it to UCSI_Init()
128 * \note Never touch any of this fields!
136 uint8_t rbBuf[(CMD_QUEUE_LEN * sizeof(UnicensCmdEntry_t))];
138 Ucs_InitData_t uniInitData;
140 Ucs_Lld_Api_t *uniLld;
142 UnicensCmdEntry_t *currentCmd;
145 #endif /* UNICENSINTEGRATION_H_ */