| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- /* Description */
- /* Module Name : vardef_hw.h */
- /* Process : VehSim */
- /* Specification : */
- /* Ino.100C0 */
- /* revision Revision: 1.0.0 */
- /* Last change made by Author: NG-Tiofack Kegne, Max Well */
- /* Date for last change $Date: 2014/09/16 13:20:35MESZ $ */
- /* Ino.400C0.000C0 */
- /* Module description : "Compiler specific Type definitions" */
- /* Ino.100C0.400C0.000C0 */
- /* Up Cell GmbH owns all the intellectual property rights, including \ */
- /* copyright and rights of confidence, in these computer programs. Such \ */
- /* intellectual property rights extend to the structure, sequence, \ */
- /* organisation and presentation of the programs and they may not be, in \ */
- /* whole or part, copied, used or transmitted in any form or by any means, \ */
- /* including electronically, without prior written permission of Up Cell GmbH */
- #if !defined(BASETYPES_H)
- /* Ino.220C0.07380.27380.000C0 */
- #define BASETYPES_H
- #include "ti_msp_dl_config.h"
- #define NUMBER_OF_CELLS 8
- typedef signed short int typSI16;
- typedef signed long int typSI32;
- typedef signed char typSI8;
- typedef unsigned short int typUI16;
- typedef unsigned long int typUI32;
- typedef unsigned char typUI8;
- typedef unsigned int typUBS;
- typedef signed int typSBS;
- typedef float typF32;
- typedef double typF64;
- typedef struct {
- typUI8 ENABLE : 1; // Cell enable status
- typUI8 EOVOLT : 1; // Overvoltage error flag
- typUI8 EUVOLT : 1; // Undervoltage error flag
- typUI8 EOCURR : 1; // Overcurrent error flag
- typUI8 EOTEMP : 1; // Overtemperature error flag
- typUI8 EUTEMP : 1; // Temperature sensor error flag
- typSI16 cell_volt; // Cell voltage (signed 16-bit integer)
- typSI16 cell_curr; // Cell current (signed 16-bit integer)
- typSI16 cell_temp; // Cell temperature (signed 16-bit integer)
- } CurrentCellValue;
- #define TRESHOLDOVERHEATINGTEMP 50
- // Enum for operation modes
- typedef enum {
- OPMODE_INIT,
- OPMODE_NORMAL_OPERATION,
- OPMODE_CAN_MESSAGE_RECEIVED,
- OPMODE_POWER_DOWN,
- OPMODE_ERROR_IN_SEGMENT,
- OPMODE_TESTMODUS_SEGMENT
- } OperationMode;
- typedef struct {
- typUI32 traceid;
- typUI32 deviceid;
- typUI32 userid;
- } DeviceID_Struct;
- extern typUI16 OverheatingThreshold;
- extern CurrentCellValue CurrentValue_Cell[NUMBER_OF_CELLS];
- extern volatile bool gCheckADC;
- extern volatile typUI32 gInterruptLine1Status;
- extern volatile bool gServiceInt;
- extern OperationMode CurrentMode;
- extern typUI8 MYORDER_ID;
- // Usage example
- extern DeviceID_Struct DeviceUID;
- #endif
|