diff --git a/.cproject b/.cproject index 4df1fd8..5f782e3 100644 --- a/.cproject +++ b/.cproject @@ -73,7 +73,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -310,7 +310,7 @@ - + @@ -359,6 +359,7 @@ + @@ -439,7 +440,7 @@ - + @@ -561,7 +562,7 @@ - + @@ -684,7 +685,7 @@ - + @@ -803,7 +804,7 @@ - + diff --git a/.launches/mspm0g3507_mcal.launch b/.launches/mspm0g3507_mcal.launch index 347b433..7e2fb36 100644 --- a/.launches/mspm0g3507_mcal.launch +++ b/.launches/mspm0g3507_mcal.launch @@ -30,7 +30,8 @@ - + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 631cf85..ae2d9af 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -26,104 +26,14 @@ encoding//AAR/subdir_rules.mk=UTF-8 encoding//AAR/subdir_vars.mk=UTF-8 encoding//AAR/utils/subdir_rules.mk=UTF-8 encoding//AAR/utils/subdir_vars.mk=UTF-8 -encoding//Debug/Core/Source/subdir_rules.mk=UTF-8 -encoding//Debug/Core/Source/subdir_vars.mk=UTF-8 -encoding//Debug/Generated\ Codes/subdir_rules.mk=UTF-8 -encoding//Debug/Generated\ Codes/subdir_vars.mk=UTF-8 encoding//Debug/LCD_1604/interface/subdir_rules.mk=UTF-8 encoding//Debug/LCD_1604/interface/subdir_vars.mk=UTF-8 encoding//Debug/LCD_1604/subdir_rules.mk=UTF-8 encoding//Debug/LCD_1604/subdir_vars.mk=UTF-8 encoding//Debug/SDK/drivers/Src/timers/subdir_rules.mk=UTF-8 encoding//Debug/SDK/drivers/Src/timers/subdir_vars.mk=UTF-8 -encoding//Debug/TM1650_SDK/src/subdir_rules.mk=UTF-8 -encoding//Debug/TM1650_SDK/src/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0c110x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0c110x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0gx51x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0gx51x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0h321x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0h321x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l111x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l111x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l11xx_l13xx/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l11xx_l13xx/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l122x_l222x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/gcc/m0p/mspm0l122x_l222x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0c110x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0c110x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0g1x0x_g3x0x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0g1x0x_g3x0x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0gx51x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0gx51x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0h321x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0h321x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l111x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l111x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l11xx_l13xx/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l11xx_l13xx/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l122x_l222x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/iar/m0p/mspm0l122x_l222x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0c110x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0c110x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0g1x0x_g3x0x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0g1x0x_g3x0x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0gx51x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0gx51x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0h321x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0h321x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l111x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l111x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l11xx_l13xx/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l11xx_l13xx/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l122x_l222x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/keil/m0p/mspm0l122x_l222x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0c110x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0c110x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0g1x0x_g3x0x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0g1x0x_g3x0x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0gx51x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0gx51x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0h321x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0h321x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l111x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l111x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l11xx_l13xx/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l11xx_l13xx/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l122x_l222x/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/lib/ticlang/m0p/mspm0l122x_l222x/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/m0p/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/m0p/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/m0p/sysctl/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/m0p/sysctl/subdir_vars.mk=UTF-8 -encoding//Debug/driverlib/subdir_rules.mk=UTF-8 -encoding//Debug/driverlib/subdir_vars.mk=UTF-8 encoding//Debug/ivec_APP/ivec_cmplx_gptimer/src/subdir_rules.mk=UTF-8 encoding//Debug/ivec_APP/ivec_cmplx_gptimer/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_APP/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_APP/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_BSW/ivec_bsw_common/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_BSW/ivec_bsw_common/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_BSW/ivec_bsw_nfc/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_BSW/ivec_bsw_nfc/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_can/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_can/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_common/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_common/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_nfc/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_nfc/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_uart/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ECU/ivec_ecu_uart/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ESDK/ivec_cmplx_gptimer/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ESDK/ivec_cmplx_gptimer/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_ESDK/ivec_esdk_nfc_pn532/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_ESDK/ivec_esdk_nfc_pn532/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_RTE/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_RTE/src/subdir_vars.mk=UTF-8 -encoding//Debug/ivec_cmplx_vframe/src/subdir_rules.mk=UTF-8 -encoding//Debug/ivec_cmplx_vframe/src/subdir_vars.mk=UTF-8 encoding//Debug/lib/gcc/m0p/mspm0c110x/subdir_rules.mk=UTF-8 encoding//Debug/lib/gcc/m0p/mspm0c110x/subdir_vars.mk=UTF-8 encoding//Debug/lib/gcc/m0p/mspm0g1x0x_g3x0x/subdir_rules.mk=UTF-8 @@ -176,13 +86,6 @@ encoding//Debug/m0p/subdir_rules.mk=UTF-8 encoding//Debug/m0p/subdir_vars.mk=UTF-8 encoding//Debug/m0p/sysctl/subdir_rules.mk=UTF-8 encoding//Debug/m0p/sysctl/subdir_vars.mk=UTF-8 -encoding//Debug/makefile=UTF-8 -encoding//Debug/objects.mk=UTF-8 -encoding//Debug/sources.mk=UTF-8 -encoding//Debug/subdir_rules.mk=UTF-8 -encoding//Debug/subdir_vars.mk=UTF-8 -encoding//Debug/utils/subdir_rules.mk=UTF-8 -encoding//Debug/utils/subdir_vars.mk=UTF-8 encoding//Test__GNU/Core/Source/subdir_rules.mk=UTF-8 encoding//Test__GNU/Core/Source/subdir_vars.mk=UTF-8 encoding//Test__GNU/Generated\ Codes/subdir_rules.mk=UTF-8 @@ -263,6 +166,8 @@ encoding//Test__GNU/ivec_APP/src/subdir_rules.mk=UTF-8 encoding//Test__GNU/ivec_APP/src/subdir_vars.mk=UTF-8 encoding//Test__GNU/ivec_BSW/ivec_bsw_common/src/subdir_rules.mk=UTF-8 encoding//Test__GNU/ivec_BSW/ivec_bsw_common/src/subdir_vars.mk=UTF-8 +encoding//Test__GNU/ivec_BSW/ivec_bsw_display/src/subdir_rules.mk=UTF-8 +encoding//Test__GNU/ivec_BSW/ivec_bsw_display/src/subdir_vars.mk=UTF-8 encoding//Test__GNU/ivec_BSW/ivec_bsw_nfc/src/subdir_rules.mk=UTF-8 encoding//Test__GNU/ivec_BSW/ivec_bsw_nfc/src/subdir_vars.mk=UTF-8 encoding//Test__GNU/ivec_ECU/ivec_ecu_can/src/subdir_rules.mk=UTF-8 diff --git a/TM1650_SDK/inc/ivec_TM1650.h b/TM1650_SDK/inc/ivec_TM1650.h deleted file mode 100644 index 566cfb8..0000000 --- a/TM1650_SDK/inc/ivec_TM1650.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * ivec_TM1650.h - * - * Created on: 16-Jul-2024 - * Author: Vecmocon Technology - */ - -#ifndef IVEC_TM1650_H_ -#define IVEC_TM1650_H_ - -#include -#include - -#if SEV_SEG_DB == 1 -#define NUM_OF_DIGITS 3 -#endif -/***********************Data Command Settings enumerations***********************/ -typedef enum{ - TM_1650_SYSTEM_CMD = 0x48, - TM_1650_READ_KEY_CMD = 0x4F, -}TM_1650_DataCommandSettings_t; -/********************************************************************************/ - - -/***********************System parameter setting enumerations***********************/ -typedef enum { - TM_1650_BRIGHT_1 = 0x10, - TM_1650_BRIGHT_2 = 0x20, - TM_1650_BRIGHT_3 = 0x30, - TM_1650_BRIGHT_4 = 0x40, - TM_1650_BRIGHT_5 = 0x50, - TM_1650_BRIGHT_6 = 0x60, - TM_1650_BRIGHT_7 = 0x70, - TM_1650_BRIGHT_8 = 0x00, -}TM_1650_Brightness_t; - -typedef enum { - TM_1650_Segment_8 = 0x00, - TM_1650_Segment_7 = 0x08, -}TM_1650_Segement_t; - -typedef enum { - TM_1650_Normal_Mode = 0x00, - TM_1650_Standby_Mode = 0x04, -}TM_1650_OperatingMode_t; - -typedef enum { - TM_1650_Screen_OFF = 0x00, - TM_1650_Screen_ON = 0x01, -}TM_1650_SwitchMode_t; -/***********************************************************************************/ - -/****************************Memory address enumerations****************************/ -typedef enum { - TM_1650_DIG_1 = 0x68, - TM_1650_DIG_2 = 0x6A, - TM_1650_DIG_3 = 0x6C, - TM_1650_DIG_4 = 0x6E, -}TM_1650_Digit_t; - -typedef enum { - TM_1650_DISPLAY_0 = 0x3F, - TM_1650_DISPLAY_1 = 0x06, -}TM_1650_DisplayVal_t; - - -typedef struct { - TM_1650_Brightness_t brightness; - TM_1650_Segement_t segment; - TM_1650_OperatingMode_t opMode; - TM_1650_SwitchMode_t switchMode; - TM_1650_Digit_t digitsToUse; - void (*dat_set_fn)(uint8_t state); - void (*clk_set_fn)(uint8_t state); - uint8_t (*read_data_fn)(void); -} tm1650_drv_t; - -typedef enum{ - TM1650_SUCCESS = 0, - TM1650_ERROR = 1, - TM1650_OUT_OF_BOUNDS = 2, -}TM1650_Status_T; - -/******************************__________API__________******************************/ -TM1650_Status_T tm1650_Init(TM_1650_Brightness_t brightness, TM_1650_Segement_t segment, \ - TM_1650_OperatingMode_t opMode, TM_1650_SwitchMode_t switchMode, \ - TM_1650_Digit_t digits, void (*dataPin)(), void (*clkPin)(), uint8_t (*readData)()); - -TM1650_Status_T tm1650_changeBrightness(TM_1650_Brightness_t brightness); - -TM1650_Status_T tm1650_changeOPMode(TM_1650_OperatingMode_t opMode); - -TM1650_Status_T tm1650_changeSegmentMode(TM_1650_Segement_t segment); - -TM1650_Status_T tm1650_displaySwitch(TM_1650_SwitchMode_t switchMode); - -TM1650_Status_T tm1650_showNum(TM_1650_Digit_t digit, uint8_t num); - -TM1650_Status_T tm1650_showAlphabet(TM_1650_Digit_t digit, char * alpha); - -TM1650_Status_T tm1650_showDot(TM_1650_Digit_t digit, bool dotFlag); - -TM1650_Status_T tm1650_removeDot(TM_1650_Digit_t digit); -/***********************************************************************************/ - -#endif /* IVEC_TM1650_H_ */ diff --git a/TM1650_SDK/src/ivec_TM1650.c b/TM1650_SDK/src/ivec_TM1650.c deleted file mode 100644 index 435bd16..0000000 --- a/TM1650_SDK/src/ivec_TM1650.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * TM1650.c - * - * Created on: 09-Jan-2023 - * Author: Vecmocon Technology - */ - -#include "../TM1650_SDK/inc/ivec_TM1650.h" - -#define NUM_OF_DIGITS 4 - -static tm1650_drv_t tm1650_drv = {0}; - -static uint8_t numericDisplayArray[10] = { 0x3F, 0x06, 0x5B, 0x4F, 0x66, \ - 0x6D, 0x7D, 0x07, 0x7F, 0x6F - }; - -#define NS 0x2D - - -static uint8_t alphabetDisplayArray[26] = { 0x77, 0x7C, 0x39, 0x5E, 0x79, \ - 0x71, 0x3D, 0x76, 0x30, 0x1E, \ - NS , 0x38, NS , NS , 0x3F, \ - 0x73, NS , NS , 0x6D, NS , \ - 0x3E, NS , NS , NS , NS , \ - NS - }; - -static uint8_t currentNum[NUM_OF_DIGITS] = {0}; - -static volatile uint8_t digitDot[NUM_OF_DIGITS] = {0}; - -static void TM1650_Start(tm1650_drv_t *drv); -static void TM1650_End(tm1650_drv_t *drv); -static TM1650_Status_T TM1650_SendByte(tm1650_drv_t *drv, uint8_t byte); - -static TM1650_Status_T tm1650_Configure(void); - -/************************************Static_functions_START************************************/ -static void TM1650_Free(tm1650_drv_t *drv){ - drv->clk_set_fn(1); - drv->dat_set_fn(1); -} - -static void TM1650_Start(tm1650_drv_t *drv){ - drv->clk_set_fn(1); - drv->dat_set_fn(0); - drv->clk_set_fn(0); -} - -static void TM1650_End(tm1650_drv_t *drv){ - drv->clk_set_fn(1); - drv->dat_set_fn(1); -// drv->clk_set_fn(0); -} - - -// uint8_t bitTosendArr[8] = {0}; -/** - * Sends a byte to the TM1650. - * - * @param drv The TM1650 driver. - * @param byte The byte to send. - * - * @returns The status of the operation. - */ -static TM1650_Status_T TM1650_SendByte(tm1650_drv_t *drv, uint8_t byte) -{ - drv->clk_set_fn(0); - uint8_t mask = 0x80; - for(int32_t i = 7; i >= 0; i--, mask >>= 1) { - uint8_t bitTosend = 0; - bitTosend = (mask & byte) >> i; - // bitTosendArr[7-i] = bitTosend; - - drv->dat_set_fn(bitTosend); - drv->clk_set_fn(1); - drv->clk_set_fn(0); - drv->dat_set_fn(0); - } - - TM1650_Status_T ackBuff = TM1650_ERROR; - drv->clk_set_fn(1); - ackBuff = (TM1650_Status_T)drv->read_data_fn(); - drv->clk_set_fn(0); - - return ackBuff; -} - -/** - * Configures the TM1650 display. - * - * @returns None - */ -static TM1650_Status_T tm1650_Configure(void){ - uint8_t txBuff = 0; - TM1650_Status_T retVal = TM1650_ERROR; - - txBuff = tm1650_drv.brightness + \ - tm1650_drv.segment + \ - tm1650_drv.opMode + \ - tm1650_drv.switchMode; - - TM1650_Free(&tm1650_drv); - TM1650_Start(&tm1650_drv); - retVal = (TM1650_Status_T)TM1650_SendByte(&tm1650_drv, TM_1650_SYSTEM_CMD); - if(retVal == TM1650_SUCCESS){ - retVal = TM1650_SendByte(&tm1650_drv, txBuff); - } - TM1650_End(&tm1650_drv); - return retVal; -} -/************************************Static_functions_END************************************/ - - -/** - * Initializes the TM1650 driver. - * - * @param brightness The brightness of the display. - * @param segment The segment of the display to use. - * @param opMode The operating mode of the display. - * @param switchMode The switch mode of the display. - * @param digits The number of digits to use. - * @param dataPin The function to use for the data line. - * @param clkPin The function to use for the clock line. - * @param readData The function to use to read the data line. - * - * @returns The status of the initialization. - */ -TM1650_Status_T tm1650_Init(TM_1650_Brightness_t brightness, TM_1650_Segement_t segment, \ - TM_1650_OperatingMode_t opMode, TM_1650_SwitchMode_t switchMode, \ - TM_1650_Digit_t digits, void (*dataPin)(), void (*clkPin)(), uint8_t (*readData)()){ - - tm1650_drv.brightness = brightness; - tm1650_drv.segment = segment; - tm1650_drv.switchMode = switchMode; - tm1650_drv.opMode = opMode; - tm1650_drv.digitsToUse = digits; - tm1650_drv.dat_set_fn = (void *)dataPin; - tm1650_drv.clk_set_fn = (void *)clkPin; - tm1650_drv.read_data_fn = readData; - - - return tm1650_Configure(); -} - -/** - * Changes the brightness of the display. - * - * @param brightness The brightness of the display. - * - * @returns None - */ -TM1650_Status_T tm1650_changeBrightness(TM_1650_Brightness_t brightness){ - tm1650_drv.brightness = brightness; - return tm1650_Configure(); -} - -/** - * Changes the operating mode of the TM1650. - * - * @param opMode The new operating mode. - * - * @returns The status of the operation. - */ -TM1650_Status_T tm1650_changeOPMode(TM_1650_OperatingMode_t opMode){ - tm1650_drv.opMode = opMode; - return tm1650_Configure(); -} - -/** - * Changes the segment mode of the TM1650. - * - * @param segment The new segment mode. - * - * @returns The status of the operation. - */ -TM1650_Status_T tm1650_changeSegmentMode(TM_1650_Segement_t segment){ - tm1650_drv.segment = segment; - return tm1650_Configure(); -} - -/** - * Configures the switchMode of the display. - * - * @param switchMode The desired mode. - * - * @returns The status of the operation. - */ -TM1650_Status_T tm1650_displaySwitch(TM_1650_SwitchMode_t switchMode){ - tm1650_drv.switchMode = switchMode; - return tm1650_Configure(); -} - -/** - * Displays a number on the TM1650 LED display. - * - * @param digit The digit to display the number on. - * @param num The number to display. - * - * @returns TM1650_SUCCESS if the number was successfully displayed. - */ -TM1650_Status_T tm1650_showNum(TM_1650_Digit_t digit, uint8_t num) -{ - TM1650_Status_T retVal = TM1650_ERROR; - if(num > 9) - return TM1650_OUT_OF_BOUNDS; - TM1650_Free(&tm1650_drv); - TM1650_Start(&tm1650_drv); - retVal = TM1650_SendByte(&tm1650_drv, digit); - if(retVal == 0) - { - retVal = TM1650_SendByte(&tm1650_drv, numericDisplayArray[num]); - } -// | digitDot[(digit - TM_1650_DIG_1)/2] - TM1650_End(&tm1650_drv); - if(retVal == TM1650_SUCCESS) - { - currentNum[digit - TM_1650_DIG_1] = digit; - } - return retVal; -} - - -/** - * Displays an alphabet on the TM1650 LED display. - * - * @param digit The digit to display the alphabet on. - * @param alpha The alphabet to display. - * - * @returns TM1650_SUCCESS if the operation was successful. - */ -TM1650_Status_T tm1650_showAlphabet(TM_1650_Digit_t digit, char * alpha) -{ - TM1650_Status_T retVal = TM1650_ERROR; - uint8_t index = 0; - index = (*alpha); - if((uint8_t)(*alpha) > 90 || (uint8_t)(*alpha) < 65) - return TM1650_OUT_OF_BOUNDS; - TM1650_Free(&tm1650_drv); - TM1650_Start(&tm1650_drv); - retVal = TM1650_SendByte(&tm1650_drv, digit); - if(retVal == 0) - { - index -= 65; - retVal = TM1650_SendByte(&tm1650_drv, alphabetDisplayArray[index]); - } - -// | digitDot[(digit - TM_1650_DIG_1)/2] - - TM1650_End(&tm1650_drv); - if(retVal == TM1650_SUCCESS) - { - currentNum[digit - TM_1650_DIG_1] = digit; - } - return retVal; -} - - -/** - * Displays and Removes the dot on a specific digit on TM1650 LED display. - * - * @param digit The digit to display on. - * @param dotFlag To Turn the Dot ON or OFF - * - * @returns None - */ -TM1650_Status_T tm1650_showDot(TM_1650_Digit_t digit, bool dotFlag) -{ - switch(digit) - { - case TM_1650_DIG_1: - - if(dotFlag == true) - digitDot[(digit - TM_1650_DIG_1)/2] = 0x80; - else - digitDot[(digit - TM_1650_DIG_1)/2] = 0x00; - break; - - case TM_1650_DIG_2: - - if(dotFlag == true) - digitDot[(digit - TM_1650_DIG_1)/2] = 0x80; - else - digitDot[(digit - TM_1650_DIG_1)/2] = 0x00; - - break; - - case TM_1650_DIG_3: - - if(dotFlag == true) - digitDot[(digit - TM_1650_DIG_1)/2] = 0x80; - else - digitDot[(digit - TM_1650_DIG_1)/2] = 0x00; - - break; - - case TM_1650_DIG_4: - - if(dotFlag == true) - digitDot[(digit - TM_1650_DIG_1)/2] = 0x80; - else - digitDot[(digit - TM_1650_DIG_1)/2] = 0x00; - - break; - - default: - break; - } -} - -/** - * *********************************************************FUNCTION DISCONTINUED*************************************************************************************** - * Removes the dot from a specific digit. - * - * @param digit The digit to remove the dot from. - * - * @returns None - */ -TM1650_Status_T tm1650_removeDot(TM_1650_Digit_t digit) -{ - TM1650_Status_T retVal = TM1650_ERROR; - TM1650_Free(&tm1650_drv); - TM1650_Start(&tm1650_drv); - retVal = TM1650_SendByte(&tm1650_drv, digit); - if(retVal == 0) - { - retVal = TM1650_SendByte(&tm1650_drv, numericDisplayArray[currentNum[digit]]); - } -} - - diff --git a/bs_touchAndLcd/SFB__canReceive__SFB.mat b/bs_touchAndLcd/SFB__canReceive__SFB.mat deleted file mode 100644 index 208759b..0000000 Binary files a/bs_touchAndLcd/SFB__canReceive__SFB.mat and /dev/null differ diff --git a/bs_touchAndLcd/batterySmartSuperpower.dbc b/bs_touchAndLcd/batterySmartSuperpower.dbc deleted file mode 100644 index 5a252ce..0000000 --- a/bs_touchAndLcd/batterySmartSuperpower.dbc +++ /dev/null @@ -1,132 +0,0 @@ -VERSION "" - - -NS_ : - NS_DESC_ - CM_ - BA_DEF_ - BA_ - VAL_ - CAT_DEF_ - CAT_ - FILTER - BA_DEF_DEF_ - EV_DATA_ - ENVVAR_DATA_ - SGTYPE_ - SGTYPE_VAL_ - BA_DEF_SGTYPE_ - BA_SGTYPE_ - SIG_TYPE_REF_ - VAL_TABLE_ - SIG_GROUP_ - SIG_VALTYPE_ - SIGTYPE_VALTYPE_ - BO_TX_BU_ - BA_DEF_REL_ - BA_REL_ - BA_DEF_DEF_REL_ - BU_SG_REL_ - BU_EV_REL_ - BU_BO_REL_ - SG_MUL_VAL_ - -BS_: - -BU_: - - -BO_ 8 New_Message_10: 8 Vector__XXX - SG_ New_Signal_67 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 7 New_Message_9: 8 Vector__XXX - SG_ New_Signal_66 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 6 New_Message_8: 8 Vector__XXX - SG_ New_Signal_65 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 5 New_Message_7: 8 Vector__XXX - SG_ New_Signal_64 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 4 New_Message_6: 8 Vector__XXX - SG_ New_Signal_63 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 3 New_Message_5: 8 Vector__XXX - SG_ New_Signal_62 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 2 New_Message_4: 8 Vector__XXX - SG_ New_Signal_61 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 1 New_Message_3: 8 Vector__XXX - SG_ New_Signal_60 : 8|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 0 New_Message_2: 8 Vector__XXX - SG_ New_Signal_59 : 0|8@1+ (1,0) [0|0] "" Vector__XXX - -BO_ 2368323178 superMaxxMsg: 8 Vector__XXX - SG_ mosfetTemp m7 : 23|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ ambientSensor m7 : 15|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ underTemp m8 : 12|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ soh m2 : 15|8@0+ (1,0) [0|255] "%" Vector__XXX - SG_ soc m2 : 23|8@0+ (1,0) [0|255] "%" Vector__XXX - SG_ shortCircuitProtection m8 : 15|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ PKT_Nb M : 7|8@0+ (1,0) [0|0] "" Vector__XXX - SG_ pack_UV m8 : 14|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ pack_OV m8 : 13|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ overTemp m8 : 11|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ overCurrent m8 : 10|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ NTC_9 m5 : 23|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_8 m5 : 15|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_7 m4 : 63|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_6 m4 : 55|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_5 m4 : 47|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_4 m4 : 39|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_3 m4 : 31|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_2 m4 : 23|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_16 m6 : 23|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_15 m6 : 15|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_14 m5 : 63|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_13 m5 : 55|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_12 m5 : 47|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_11 m5 : 39|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_10 m5 : 31|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ NTC_1 m4 : 15|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ dischargingMosfet m3 : 8|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ chargingMosfet m3 : 9|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ chargingCycle m2 : 31|16@0+ (1,0) [0|65535] "" Vector__XXX - SG_ cellVoltage_9 m11 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_8 m11 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_7 m11 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_6 m10 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_5 m10 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_4 m10 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_3 m9 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_2 m9 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_16 m14 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_15 m13 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_14 m13 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_13 m13 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_12 m12 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_11 m12 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_10 m12 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellVoltage_1 m9 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ cellUnderVoltage m8 : 9|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ cellOverVoltage m8 : 8|1@0+ (1,0) [0|1] "" Vector__XXX - SG_ bmsId_4 m0 : 47|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ bmsId_3 m0 : 39|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ bmsId_2 m0 : 31|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ bmsId_1 m0 : 23|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ bmsId_0 m0 : 15|8@0+ (1,0) [0|255] "" Vector__XXX - SG_ battVoltage m1 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX - SG_ battTemperature m1 : 47|8@0- (1,0) [-128|127] "" Vector__XXX - SG_ battLoadStatus m1 : 55|8@0+ (1,0) [-128|127] "" Vector__XXX - SG_ battCurrent m1 : 31|16@0- (1,0) [-32768|32767] "mA" Vector__XXX - SG_ battCapacity m2 : 47|16@0+ (1,0) [0|65535] "" Vector__XXX - - - -BA_DEF_ "MultiplexExtEnabled" ENUM "No","Yes"; -BA_DEF_ "BusType" STRING ; -BA_DEF_DEF_ "MultiplexExtEnabled" "No"; -BA_DEF_DEF_ "BusType" "CAN"; - diff --git a/bs_touchAndLcd/canReceive.c b/bs_touchAndLcd/canReceive.c deleted file mode 100644 index 1bc5862..0000000 --- a/bs_touchAndLcd/canReceive.c +++ /dev/null @@ -1,530 +0,0 @@ -/* - * File: canReceive.c - * - * - * --- THIS FILE GENERATED BY S-FUNCTION BUILDER: 3.0 --- - * - * This file is an S-function produced by the S-Function - * Builder which only recognizes certain fields. Changes made - * outside these fields will be lost the next time the block is - * used to load, edit, and resave this file. This file will be overwritten - * by the S-function Builder block. If you want to edit this file by hand, - * you must change it only in the area defined as: - * - * %%%-SFUNWIZ_defines_Changes_BEGIN - * #define NAME 'replacement text' - * %%% SFUNWIZ_defines_Changes_END - * - * DO NOT change NAME--Change the 'replacement text' only. - * - * For better compatibility with the Simulink Coder, the - * "wrapper" S-function technique is used. This is discussed - * in the Simulink Coder's Manual in the Chapter titled, - * "Wrapper S-functions". - * - * ------------------------------------------------------------------------- - * | See matlabroot/simulink/src/sfuntmpl_doc.c for a more detailed template | - * ------------------------------------------------------------------------- - * - * Created: Mon Oct 28 13:36:38 2024 - */ - -#define S_FUNCTION_LEVEL 2 -#define S_FUNCTION_NAME canReceive - -/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ -/* %%%-SFUNWIZ_defines_Changes_BEGIN --- EDIT HERE TO _END */ -#define NUM_INPUTS 3 - -/* Input Port 0 */ -#define IN_PORT_0_NAME id -#define INPUT_0_DIMS_ND {1,1} -#define INPUT_0_NUM_ELEMS 1 -#define INPUT_0_WIDTH 1 -#define INPUT_DIMS_0_COL 1 -#define INPUT_0_DTYPE uint32_T -#define INPUT_0_COMPLEX COMPLEX_NO -#define IN_0_BUS_BASED 0 -#define IN_0_BUS_NAME -#define IN_0_DIMS 1-D -#define INPUT_0_FEEDTHROUGH 1 -#define IN_0_ISSIGNED 0 -#define IN_0_WORDLENGTH 8 -#define IN_0_FIXPOINTSCALING 1 -#define IN_0_FRACTIONLENGTH 9 -#define IN_0_BIAS 0 -#define IN_0_SLOPE 0.125 - -/* Input Port 1 */ -#define IN_PORT_1_NAME dlc -#define INPUT_1_DIMS_ND {1,1} -#define INPUT_1_NUM_ELEMS 1 -#define INPUT_1_WIDTH 1 -#define INPUT_DIMS_1_COL 1 -#define INPUT_1_DTYPE uint8_T -#define INPUT_1_COMPLEX COMPLEX_NO -#define IN_1_BUS_BASED 0 -#define IN_1_BUS_NAME -#define IN_1_DIMS 1-D -#define INPUT_1_FEEDTHROUGH 1 -#define IN_1_ISSIGNED 0 -#define IN_1_WORDLENGTH 8 -#define IN_1_FIXPOINTSCALING 1 -#define IN_1_FRACTIONLENGTH 9 -#define IN_1_BIAS 0 -#define IN_1_SLOPE 0.125 - -/* Input Port 2 */ -#define IN_PORT_2_NAME data -#define INPUT_2_DIMS_ND {8,1} -#define INPUT_2_NUM_ELEMS 8 -#define INPUT_2_WIDTH 8 -#define INPUT_DIMS_2_COL 1 -#define INPUT_2_DTYPE uint8_T -#define INPUT_2_COMPLEX COMPLEX_NO -#define IN_2_BUS_BASED 0 -#define IN_2_BUS_NAME -#define IN_2_DIMS 2-D -#define INPUT_2_FEEDTHROUGH 1 -#define IN_2_ISSIGNED 0 -#define IN_2_WORDLENGTH 8 -#define IN_2_FIXPOINTSCALING 1 -#define IN_2_FRACTIONLENGTH 9 -#define IN_2_BIAS 0 -#define IN_2_SLOPE 0.125 -#define NUM_OUTPUTS 1 - -/* Output Port 0 */ -#define OUT_PORT_0_NAME canFrame -#define OUTPUT_0_DIMS_ND {1,1} -#define OUTPUT_0_NUM_ELEMS 1 -#define OUTPUT_0_WIDTH 1 -#define OUTPUT_DIMS_0_COL 1 -#define OUTPUT_0_DTYPE uint8_T -#define OUTPUT_0_COMPLEX COMPLEX_NO -#define OUT_0_BUS_BASED 1 -#define OUT_0_BUS_NAME CAN_MESSAGE_BUS -#define OUT_0_DIMS 1-D -#define OUT_0_ISSIGNED 1 -#define OUT_0_WORDLENGTH 8 -#define OUT_0_FIXPOINTSCALING 1 -#define OUT_0_FRACTIONLENGTH 3 -#define OUT_0_BIAS 0 -#define OUT_0_SLOPE 0.125 -#define NPARAMS 0 -#define SAMPLE_TIME_0 INHERITED_SAMPLE_TIME -#define NUM_DISC_STATES 0 -#define DISC_STATES_IC [0] -#define NUM_CONT_STATES 0 -#define CONT_STATES_IC [0] -#define SFUNWIZ_GENERATE_TLC 1 -#define SOURCEFILES "__SFB__" -#define PANELINDEX N/A -#define USE_SIMSTRUCT 0 -#define SHOW_COMPILE_STEPS 0 -#define CREATE_DEBUG_MEXFILE 0 -#define SAVE_CODE_ONLY 0 -#define SFUNWIZ_REVISION 3.0 - -/* %%%-SFUNWIZ_defines_Changes_END --- EDIT HERE TO _BEGIN */ -/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ -#include "simstruc.h" -#include "canReceive_bus.h" - -/* - * Code Generation Environment flag (simulation or standalone target). - */ -static int_T isSimulationTarget; - -/* Utility function prototypes. */ -static int_T GetRTWEnvironmentMode(SimStruct *S); - -/* Macro used to check if Simulation mode is set to accelerator */ -#define isBusDWorkPresent ( ( ( !ssRTWGenIsCodeGen(S) || isSimulationTarget ) && !ssIsExternalSim(S) ) || ssIsRapidAcceleratorActive(S) ) - -typedef struct { - int_T offset; - int_T elemSize; - int_T numElems; -} busInfoStruct; - -extern void canReceive_Outputs_wrapper(const uint32_T *id, - const uint8_T *dlc, - const uint8_T *data, - CAN_MESSAGE_BUS *canFrame); - -/*====================* - * S-function methods * - *====================*/ -/* Function: mdlInitializeSizes =============================================== - * Abstract: - * Setup sizes of the various vectors. - */ -static void mdlInitializeSizes(SimStruct *S) -{ - DECL_AND_INIT_DIMSINFO(inputDimsInfo); - ssSetNumSFcnParams(S, NPARAMS); - if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) { - return; /* Parameter mismatch will be reported by Simulink */ - } - - ssSetArrayLayoutForCodeGen(S, SS_COLUMN_MAJOR); - ssSetOperatingPointCompliance(S, USE_DEFAULT_OPERATING_POINT); - ssSetNumContStates(S, NUM_CONT_STATES); - ssSetNumDiscStates(S, NUM_DISC_STATES); - if (!ssSetNumInputPorts(S, NUM_INPUTS)) - return; - - /* Input Port 0 */ - ssSetInputPortWidth(S, 0, INPUT_0_NUM_ELEMS); - ssSetInputPortDataType(S, 0, SS_UINT32); - ssSetInputPortComplexSignal(S, 0, INPUT_0_COMPLEX); - ssSetInputPortDirectFeedThrough(S, 0, INPUT_0_FEEDTHROUGH); - ssSetInputPortRequiredContiguous(S, 0, 1);/*direct input signal access*/ - - /* Input Port 1 */ - ssSetInputPortWidth(S, 1, INPUT_1_NUM_ELEMS); - ssSetInputPortDataType(S, 1, SS_UINT8); - ssSetInputPortComplexSignal(S, 1, INPUT_1_COMPLEX); - ssSetInputPortDirectFeedThrough(S, 1, INPUT_1_FEEDTHROUGH); - ssSetInputPortRequiredContiguous(S, 1, 1);/*direct input signal access*/ - - /* Input Port 2 */ - ssAllowSignalsWithMoreThan2D(S); - inputDimsInfo.numDims = 2; - inputDimsInfo.width = INPUT_2_NUM_ELEMS; - int_T in2Dims[] = INPUT_2_DIMS_ND; - inputDimsInfo.dims = in2Dims; - ssSetInputPortDimensionInfo(S, 2, &inputDimsInfo); - ssSetInputPortDataType(S, 2, SS_UINT8); - ssSetInputPortComplexSignal(S, 2, INPUT_2_COMPLEX); - ssSetInputPortDirectFeedThrough(S, 2, INPUT_2_FEEDTHROUGH); - ssSetInputPortRequiredContiguous(S, 2, 1);/*direct input signal access*/ - if (!ssSetNumOutputPorts(S, NUM_OUTPUTS)) - return; - - /* Output Port 0 */ - - /* Register CAN_MESSAGE_BUS datatype for Output port 0 */ -#if defined(MATLAB_MEX_FILE) - - if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { - DTypeId dataTypeIdReg; - ssRegisterTypeFromNamedObject(S, "CAN_MESSAGE_BUS", &dataTypeIdReg); - if (dataTypeIdReg == INVALID_DTYPE_ID) - return; - ssSetOutputPortDataType(S, 0, dataTypeIdReg); - } - -#endif - - ssSetOutputPortWidth(S, 0, OUTPUT_0_NUM_ELEMS); - ssSetBusOutputObjectName(S, 0, (void *) "CAN_MESSAGE_BUS"); - ssSetOutputPortComplexSignal(S, 0, OUTPUT_0_COMPLEX); - ssSetBusOutputAsStruct(S, 0,OUT_0_BUS_BASED); - ssSetOutputPortBusMode(S, 0, SL_BUS_MODE); - if (ssRTWGenIsCodeGen(S)) { - isSimulationTarget = GetRTWEnvironmentMode(S); - if (isSimulationTarget == -1) { - ssSetLocalErrorStatus(S, - " Unable to determine a valid code generation environment mode"); - return; - } - - isSimulationTarget |= ssRTWGenIsModelReferenceSimTarget(S); - } - - /* Set the number of dworks */ - if (!ssSetNumDWork(S, 1)) - return; - - /* - * Configure the dwork 0 (canFrameBUS) - */ -#if defined(MATLAB_MEX_FILE) - - if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { - DTypeId dataTypeIdReg; - ssRegisterTypeFromNamedObject(S, "CAN_MESSAGE_BUS", &dataTypeIdReg); - if (dataTypeIdReg == INVALID_DTYPE_ID) - return; - if (isBusDWorkPresent) { - ssSetDWorkDataType(S, 0, dataTypeIdReg); - } else { - ssSetDWorkDataType(S, 0, SS_POINTER); - } - } - -#endif - - ssSetDWorkUsageType(S, 0, SS_DWORK_USED_AS_DWORK); - ssSetDWorkName(S, 0, "canFrameBUS"); - ssSetDWorkWidth(S, 0, DYNAMICALLY_SIZED); - ssSetDWorkComplexSignal(S, 0, COMPLEX_NO); - ssSetNumPWork(S, 0); - ssSetNumSampleTimes(S, 1); - ssSetNumRWork(S, 0); - ssSetNumIWork(S, 0); - ssSetNumModes(S, 0); - ssSetNumNonsampledZCs(S, 0); - ssSetSimulinkVersionGeneratedIn(S, "23.2"); - - /* Take care when specifying exception free code - see sfuntmpl_doc.c */ - ssSetRuntimeThreadSafetyCompliance(S, RUNTIME_THREAD_SAFETY_COMPLIANCE_FALSE); - ssSetOptions(S, (SS_OPTION_EXCEPTION_FREE_CODE | - SS_OPTION_USE_TLC_WITH_ACCELERATOR | - SS_OPTION_WORKS_WITH_CODE_REUSE)); -} - -#if defined(MATLAB_MEX_FILE) -#define MDL_SET_INPUT_PORT_DIMENSION_INFO - -static void mdlSetInputPortDimensionInfo(SimStruct *S, - int_T port, - const DimsInfo_T *dimsInfo) -{ - if (!ssSetInputPortDimensionInfo(S, port, dimsInfo)) - return; -} - -#endif - -#define MDL_SET_OUTPUT_PORT_DIMENSION_INFO -#if defined(MDL_SET_OUTPUT_PORT_DIMENSION_INFO) - -static void mdlSetOutputPortDimensionInfo(SimStruct *S, - int_T port, - const DimsInfo_T *dimsInfo) -{ - if (!ssSetOutputPortDimensionInfo(S, port, dimsInfo)) - return; -} - -#endif - -#define MDL_SET_DEFAULT_PORT_DIMENSION_INFO - -static void mdlSetDefaultPortDimensionInfo(SimStruct *S) -{ - DECL_AND_INIT_DIMSINFO(portDimsInfo); - int_T dims[2]; - - /* Setting default dimensions for input port 2 */ - portDimsInfo.width = INPUT_2_NUM_ELEMS; - dims[0] = INPUT_2_NUM_ELEMS; - dims[1] = 1; - portDimsInfo.dims = dims; - portDimsInfo.numDims = 2; - if (ssGetInputPortWidth(S, 2) == DYNAMICALLY_SIZED) { - ssSetInputPortMatrixDimensions(S, 2, 1 , 1); - } - - return; -} - -/* Function: mdlInitializeSampleTimes ========================================= - * Abstract: - * Specifiy the sample time. - */ -static void mdlInitializeSampleTimes(SimStruct *S) -{ - ssSetSampleTime(S, 0, SAMPLE_TIME_0); - ssSetModelReferenceSampleTimeDefaultInheritance(S); - ssSetOffsetTime(S, 0, 0.0); -} - -#define MDL_SET_INPUT_PORT_DATA_TYPE - -static void mdlSetInputPortDataType(SimStruct *S, int port, DTypeId dType) -{ - ssSetInputPortDataType(S, 0, dType); -} - -#define MDL_SET_OUTPUT_PORT_DATA_TYPE - -static void mdlSetOutputPortDataType(SimStruct *S, int port, DTypeId dType) -{ - ssSetOutputPortDataType(S, 0, dType); -} - -#define MDL_SET_DEFAULT_PORT_DATA_TYPES - -static void mdlSetDefaultPortDataTypes(SimStruct *S) -{ - ssSetInputPortDataType(S, 0, SS_DOUBLE); - ssSetOutputPortDataType(S, 0, SS_DOUBLE); -} - -#define MDL_SET_WORK_WIDTHS -#if defined(MDL_SET_WORK_WIDTHS) && defined(MATLAB_MEX_FILE) - -static void mdlSetWorkWidths(SimStruct *S) -{ - /* Set the width of DWork(s) used for marshalling the IOs */ - if (isBusDWorkPresent) { - /* Update dwork 0 */ - ssSetDWorkWidth(S, 0, ssGetOutputPortWidth(S, 0)); - } -} - -#endif - -#define MDL_START /* Change to #undef to remove function */ -#if defined(MDL_START) - -/* Function: mdlStart ======================================================= - * Abstract: - * This function is called once at start of model execution. If you - * have states that should be initialized once, this is the place - * to do it. - */ -static void mdlStart(SimStruct *S) -{ - /* Bus Information */ - slDataTypeAccess *dta = ssGetDataTypeAccess(S); - const char *bpath = ssGetPath(S); - DTypeId CAN_MESSAGE_BUSId = ssGetDataTypeId(S,"CAN_MESSAGE_BUS"); - busInfoStruct *busInfo = (busInfoStruct *)malloc(8*sizeof(busInfoStruct)); - if (busInfo==NULL) { - ssSetLocalErrorStatus(S, "Memory allocation failure"); - return; - } - - /*offsets info for all unique bus structures*/ - busInfo[0].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 0); - busInfo[0].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8); - busInfo[0].numElems = 1; - busInfo[1].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 1); - busInfo[1].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8); - busInfo[1].numElems = 1; - busInfo[2].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 2); - busInfo[2].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8); - busInfo[2].numElems = 1; - busInfo[3].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 3); - busInfo[3].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8); - busInfo[3].numElems = 1; - busInfo[4].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 4); - busInfo[4].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT32); - busInfo[4].numElems = 1; - busInfo[5].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 5); - busInfo[5].elemSize = dtaGetDataTypeSize(dta, bpath, SS_DOUBLE); - busInfo[5].numElems = 1; - busInfo[6].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId, - 6); - busInfo[6].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8); - busInfo[6].numElems = 8; - busInfo[7].elemSize = dtaGetDataTypeSize(dta, bpath, CAN_MESSAGE_BUSId); - busInfo[7].numElems = ssGetOutputPortWidth(S, 0); - ssSetUserData(S, busInfo); - - /* Allocate memory for arrays or nested arrays of buses DWork pointers */ -} - -#endif /* MDL_START */ - -/* Function: mdlOutputs ======================================================= - * - */ -static void mdlOutputs(SimStruct *S, int_T tid) -{ - const uint32_T *id = (uint32_T *) ssGetInputPortRealSignal(S, 0); - const uint8_T *dlc = (uint8_T *) ssGetInputPortRealSignal(S, 1); - const uint8_T *data = (uint8_T *) ssGetInputPortRealSignal(S, 2); - char *canFrame = (char *) ssGetOutputPortSignal(S, 0); - busInfoStruct* busInfo = (busInfoStruct *) ssGetUserData(S); - - /* Temporary bus copy declarations */ - CAN_MESSAGE_BUS _canFrameBUS; - slDataTypeAccess *dta = ssGetDataTypeAccess(S); - const char *bpath = ssGetPath(S); - - /*Copy from Simulink to bus structure*/ - canReceive_Outputs_wrapper(id, dlc, data, &_canFrameBUS); - - /*Copy from bus structure to Simulink*/ - - /*Copy from _canFrameBUS to Simulink for Output port 0*/ - *((uint8_T*)((char *) canFrame + busInfo[0].offset)) = (_canFrameBUS).Extended; - *((uint8_T*)((char *) canFrame + busInfo[1].offset)) = (_canFrameBUS).Length; - *((uint8_T*)((char *) canFrame + busInfo[2].offset)) = (_canFrameBUS).Remote; - *((uint8_T*)((char *) canFrame + busInfo[3].offset)) = (_canFrameBUS).Error; - *((uint32_T*)((char *) canFrame + busInfo[4].offset)) = (_canFrameBUS).ID; - *((real_T*)((char *) canFrame + busInfo[5].offset)) = (_canFrameBUS).Timestamp; - (void) memcpy((char *) canFrame + busInfo[6].offset, (_canFrameBUS).Data, 8* - busInfo[6].elemSize); -} - -/* Function: mdlTerminate ===================================================== - * Abstract: - * In this function, you should perform any actions that are necessary - * at the termination of a simulation. For example, if memory was - * allocated in mdlStart, this is the place to free it. - */ -static void mdlTerminate(SimStruct *S) -{ - /* Free stored bus information */ - busInfoStruct *busInfo = (busInfoStruct *) ssGetUserData(S); - if (busInfo != NULL) { - free(busInfo); - } - - if (!isBusDWorkPresent) { - } -} - -static int_T GetRTWEnvironmentMode(SimStruct *S) -{ - int_T status = -1; - mxArray *plhs[1]; - mxArray *prhs[1]; - mxArray * err; - - /* - * Get the name of the Simulink block diagram - */ - prhs[0] = mxCreateString(ssGetBlockDiagramName(S)); - plhs[0] = NULL; - - /* - * Call "isSimulationTarget = rtwenvironmentmode(modelName)" in MATLAB - */ - err = mexCallMATLABWithTrap(1, plhs, 1, prhs, "rtwenvironmentmode"); - mxDestroyArray(prhs[0]); - - /* - * Set the error status if an error occurred - */ - if (err) { - if (plhs[0]) { - mxDestroyArray(plhs[0]); - plhs[0] = NULL; - } - - ssSetLocalErrorStatus(S, - "Unknown error during call to 'rtwenvironmentmode'."); - return -1; - } - - /* - * Get the value returned by rtwenvironmentmode(modelName) - */ - if (plhs[0]) { - status = (int_T) (mxGetScalar(plhs[0]) != 0); - mxDestroyArray(plhs[0]); - plhs[0] = NULL; - } - - return (status); -} - -#ifdef MATLAB_MEX_FILE /* Is this file being compiled as a MEX-file? */ -#include "simulink.c" /* MEX-file interface mechanism */ -#else -#include "cg_sfun.h" /* Code generation registration function */ -#endif diff --git a/bs_touchAndLcd/canReceive.mexw64 b/bs_touchAndLcd/canReceive.mexw64 deleted file mode 100644 index 98984be..0000000 Binary files a/bs_touchAndLcd/canReceive.mexw64 and /dev/null differ diff --git a/bs_touchAndLcd/canReceive.tlc b/bs_touchAndLcd/canReceive.tlc deleted file mode 100644 index cef6b35..0000000 --- a/bs_touchAndLcd/canReceive.tlc +++ /dev/null @@ -1,142 +0,0 @@ -%% File : canReceive.tlc -%% Created : Mon Oct 28 13:36:38 2024 -%% -%% Description: -%% Simulink Coder wrapper functions interface generated for -%% S-function "canReceive.c". -%% -%% File generated by S-function Builder Block -%% -%% For more information on using the Target Language with the -%% Simulink Coder, see the Target Language Compiler manual -%% (under Simulink Coder) in the "Inlining S-Functions" -%% chapter under the section and subsection: -%% "Writing Block Target Files to Inline S-Functions", -%% "Function-Based or Wrappered Code". -%% -%implements canReceive "C" -%% Function: BlockTypeSetup =================================================== -%% -%% Purpose: -%% Set up external references for wrapper functions in the -%% generated code. -%% -%function BlockTypeSetup(block, system) Output - %assign uint32Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT32) - %assign charType = LibGetDataTypeNameFromId(::CompiledModel.tSS_CHAR) - %assign uint8Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT8) - - %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel - %assign hFileName = "canReceive_accel_wrapper" - %assign hFileNameMacro = FEVAL("upper", hFileName) - %openfile hFile = "%.h" - %selectfile hFile - #ifndef _%_H_ - #define _%_H_ - - #ifdef MATLAB_MEX_FILE - #include "tmwtypes.h" - #else - % - #endif - #ifdef __cplusplus - #define SFB_EXTERN_C extern "C" - #else - #define SFB_EXTERN_C extern - #endif - SFB_EXTERN_C void canReceive_Outputs_wrapper_accel(const % *id, - const % *dlc, - const % *data, - void *canFrame, void *__canFrameBUS); - #undef SFB_EXTERN_C - #endif - %closefile hFile - - %assign cFileName = "canReceive_accel_wrapper" - %openfile cFile = "%.c" - %selectfile cFile - #include - #ifdef MATLAB_MEX_FILE - #include "tmwtypes.h" - #else - % - #endif - #include "%.h" - #include "canReceive_bus.h" - - - extern void canReceive_Start_wrapper(void); - extern void canReceive_Outputs_wrapper(const % *id, - const % *dlc, - const % *data, - CAN_MESSAGE_BUS *canFrame); - extern void canReceive_Terminate_wrapper(void); - void canReceive_Outputs_wrapper_accel(const % *id, - const % *dlc, - const % *data, - void *canFrame, void *__canFrameBUS){ - canReceive_Outputs_wrapper(id, - dlc, - data, - (CAN_MESSAGE_BUS *) __canFrameBUS); - - %assign dTypeId = LibBlockOutputSignalDataTypeId(0) - % *) canFrame", "(*(CAN_MESSAGE_BUS *) __canFrameBUS)", 0)> - } - - %closefile cFile - - %.h")> - - %else - %openfile externs - - #ifdef __cplusplus - #define SFB_EXTERN_C extern "C" - #else - #define SFB_EXTERN_C extern - #endif - - SFB_EXTERN_C void canReceive_Start_wrapper(void); - - SFB_EXTERN_C void canReceive_Outputs_wrapper(const % *id, - const % *dlc, - const % *data, - CAN_MESSAGE_BUS *canFrame); - - SFB_EXTERN_C void canReceive_Terminate_wrapper(void); - - #undef SFB_EXTERN_C - %closefile externs - % - - %endif - %% -%endfunction - - -%% Function: Outputs ========================================================== -%% -%% Purpose: -%% Code generation rules for mdlOutputs function. -%% -%function Outputs(block, system) Output - %% - %assign pu0 = LibBlockInputSignalAddr(0, "", "", 0) - %assign pu1 = LibBlockInputSignalAddr(1, "", "", 0) - %assign pu2 = LibBlockInputSignalAddr(2, "", "", 0) - %assign py0 = LibBlockOutputSignalAddr(0, "", "", 0) - - %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel - %assign canFrameBUS_ptr = LibBlockDWorkAddr(canFrameBUS, "", "", 0) - canReceive_Outputs_wrapper_accel(%, %, %, %, %); - %else - canReceive_Outputs_wrapper(%, %, %, %); - %endif - - %% -%endfunction - - -%% [EOF] canReceive.tlc - diff --git a/bs_touchAndLcd/canReceive_bus.h b/bs_touchAndLcd/canReceive_bus.h deleted file mode 100644 index a2c6d8f..0000000 --- a/bs_touchAndLcd/canReceive_bus.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated by S-function Builder */ -#ifndef _CANRECEIVE_BUS_H_ -#define _CANRECEIVE_BUS_H_ -/* Read only - STARTS */ -#ifdef MATLAB_MEX_FILE -#include "tmwtypes.h" -#else -#include "rtwtypes.h" -#endif - - - - -#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ -#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ -typedef struct { - uint8_T Extended; - uint8_T Length; - uint8_T Remote; - uint8_T Error; - uint32_T ID; - real_T Timestamp; - uint8_T Data[8]; -} CAN_MESSAGE_BUS; -#endif - -/* Read only - ENDS */ - - -#endif diff --git a/bs_touchAndLcd/canReceive_wrapper.c b/bs_touchAndLcd/canReceive_wrapper.c deleted file mode 100644 index 1bb17cb..0000000 --- a/bs_touchAndLcd/canReceive_wrapper.c +++ /dev/null @@ -1,63 +0,0 @@ - -/* - * Include Files - * - */ -#if defined(MATLAB_MEX_FILE) -#include "tmwtypes.h" -#include "simstruc_types.h" -#else -#define SIMPLIFIED_RTWTYPES_COMPATIBILITY -#include "rtwtypes.h" -#undef SIMPLIFIED_RTWTYPES_COMPATIBILITY -#endif - -#include "canReceive_bus.h" - -/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */ -#include -/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */ -#define u_width 1 -#define u_1_width 1 -#define u_2_width 8 -#define y_width 1 - -/* - * Create external references here. - * - */ -/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */ -/* extern double func(double a); */ -/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */ - -/* - * Output function - * - */ -void canReceive_Outputs_wrapper(const uint32_T *id, - const uint8_T *dlc, - const uint8_T *data, - CAN_MESSAGE_BUS *canFrame) -{ -/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */ -/* This sample sets the output equal to the input - y0[0] = u0[0]; - For complex signals use: y0[0].re = u0[0].re; - y0[0].im = u0[0].im; - y1[0].re = u1[0].re; - y1[0].im = u1[0].im; - */ - canFrame->ID = *(id); - canFrame->Length = *(dlc); - for(int ijk = 0; ijk < (*dlc); ijk++) - canFrame->Data[ijk] = data[ijk]; - if( canFrame->ID > 0x7FF ) - canFrame->Extended = 1; - else - canFrame->Extended = 0; - - // memcpy(canFrame->Data, data, *(dlc)); -/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */ -} - - diff --git a/bs_touchAndLcd/rtwmakecfg.m b/bs_touchAndLcd/rtwmakecfg.m deleted file mode 100644 index a0e1421..0000000 --- a/bs_touchAndLcd/rtwmakecfg.m +++ /dev/null @@ -1,66 +0,0 @@ -function makeInfo=rtwmakecfg() -%RTWMAKECFG.m adds include and source directories to rtw make files. -% makeInfo=RTWMAKECFG returns a structured array containing -% following field: -% makeInfo.includePath - cell array containing additional include -% directories. Those directories will be -% expanded into include instructions of Simulink -% Coder generated make files. -% -% makeInfo.sourcePath - cell array containing additional source -% directories. Those directories will be -% expanded into rules of Simulink Coder generated -% make files. -makeInfo.includePath = {}; -makeInfo.sourcePath = {}; -makeInfo.linkLibsObjs = {}; - -% - -sfBuilderBlocksByMaskType = find_system(bdroot,'FollowLinks','on','LookUnderMasks','on','MaskType','S-Function Builder'); -sfBuilderBlocksByCallback = find_system(bdroot,'OpenFcn','sfunctionwizard(gcbh)'); -sfBuilderBlocksDeployed = find_system(bdroot,'BlockType','S-Function','SFunctionDeploymentMode','on'); -sfBuilderBlocks = {sfBuilderBlocksByMaskType{:} sfBuilderBlocksByCallback{:} sfBuilderBlocksDeployed{:}}; -sfBuilderBlocks = unique(sfBuilderBlocks); -if isempty(sfBuilderBlocks) - return; -end -sfBuilderBlockNameMATFile = cell(1, length(sfBuilderBlocks)); -for idx = 1:length(sfBuilderBlocks) - sfBuilderBlockNameMATFile{idx} = get_param(sfBuilderBlocks{idx},'FunctionName'); - sfBuilderBlockNameMATFile{idx} = ['.' filesep 'SFB__' char(sfBuilderBlockNameMATFile{idx}) '__SFB.mat']; -end -sfBuilderBlockNameMATFile = unique(sfBuilderBlockNameMATFile); -for idx = 1:length(sfBuilderBlockNameMATFile) - if exist(sfBuilderBlockNameMATFile{idx}, 'file') - loadedData = load(sfBuilderBlockNameMATFile{idx}); - if isfield(loadedData,'SFBInfoStruct') - makeInfo = UpdateMakeInfo(makeInfo,loadedData.SFBInfoStruct); - clear loadedData; - end - end -end - -function updatedMakeInfo = UpdateMakeInfo(makeInfo,SFBInfoStruct) -updatedMakeInfo = {}; -if isfield(makeInfo,'includePath') - if isfield(SFBInfoStruct,'includePath') - updatedMakeInfo.includePath = {makeInfo.includePath{:} SFBInfoStruct.includePath{:}}; - else - updatedMakeInfo.includePath = {makeInfo.includePath{:}}; - end -end -if isfield(makeInfo,'sourcePath') - if isfield(SFBInfoStruct,'sourcePath') - updatedMakeInfo.sourcePath = {makeInfo.sourcePath{:} SFBInfoStruct.sourcePath{:}}; - else - updatedMakeInfo.sourcePath = {makeInfo.sourcePath{:}}; - end -end -if isfield(makeInfo,'linkLibsObjs') - if isfield(SFBInfoStruct,'additionalLibraries') - updatedMakeInfo.linkLibsObjs = {makeInfo.linkLibsObjs{:} SFBInfoStruct.additionalLibraries{:}}; - else - updatedMakeInfo.linkLibsObjs = {makeInfo.linkLibsObjs{:}}; - end -end diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/info/binfo.mat b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/info/binfo.mat deleted file mode 100644 index 011b448..0000000 Binary files a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/info/binfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlc b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlc deleted file mode 100644 index 28c368a..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlc +++ /dev/null @@ -1,39 +0,0 @@ -%implements "chartSource" "C" -%function ChartConfig(block, system) void - %createrecord chartConfiguration { ... - executeAtInitialization 0 ... - } - %return chartConfiguration -%endfunction -%function ChartDataMap(block, system) void - %createrecord ChartDataElements {\ - NumChartData 3 \ - ChartDataDefaults {\ - RecordType "ChartData"\ - Dimensions []\ - IsTestPoint 0\ - }\ - ChartData {\ - Name "is_active_c1_socTouchDisplay"\ - Description "StateIsActive"\ - SFName ""\ - Path ""\ - SrcLocation ""\ - }\ - ChartData {\ - Name "is_c1_socTouchDisplay"\ - Description "StateActiveChild"\ - SFName ""\ - Path ""\ - SrcLocation ""\ - }\ - ChartData {\ - Name "durationCounter_1"\ - Description ""\ - SFName ""\ - Path "bmsPresent"\ - SrcLocation ""\ - }\ - } - %return ChartDataElements -%endfunction diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlh b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlh deleted file mode 100644 index 8b13789..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c1_socTouchDisplay.tlh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlc b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlc deleted file mode 100644 index 100a370..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlc +++ /dev/null @@ -1,53 +0,0 @@ -%implements "chartSource" "C" -%function ChartConfig(block, system) void - %createrecord chartConfiguration { ... - executeAtInitialization 0 ... - } - %return chartConfiguration -%endfunction -%function ChartDataMap(block, system) void - %createrecord ChartDataElements {\ - NumChartData 5 \ - ChartDataDefaults {\ - RecordType "ChartData"\ - Dimensions []\ - IsTestPoint 0\ - }\ - ChartData {\ - Name "is_active_c3_socTouchDisplay"\ - Description "StateIsActive"\ - SFName ""\ - Path ""\ - SrcLocation ""\ - }\ - ChartData {\ - Name "is_c3_socTouchDisplay"\ - Description "StateActiveChild"\ - SFName ""\ - Path ""\ - SrcLocation ""\ - }\ - ChartData {\ - Name "temporalCounter_i1"\ - Description "TemporalCounter"\ - SFName ""\ - Path ""\ - SrcLocation ""\ - }\ - ChartData {\ - Name "durationCounter_1"\ - Description ""\ - SFName ""\ - Path "touchNotDetected"\ - SrcLocation ""\ - }\ - ChartData {\ - Name "durationCounter_2"\ - Description ""\ - SFName ""\ - Path "touchNotDetected"\ - SrcLocation ""\ - }\ - } - %return ChartDataElements -%endfunction diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlh b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlh deleted file mode 100644 index 8b13789..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/c3_socTouchDisplay.tlh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlc b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlc deleted file mode 100644 index 49fa6c9..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlc +++ /dev/null @@ -1,49 +0,0 @@ -%implements "machineSource" "C" -%function CacheMachineDefinitions(block,system) void -%openfile tmpFcnBuf -%closefile tmpFcnBuf -%\ - -%endfunction -%function DumpMachineInitializer(block) Output - -%openfile tmpFcnBuf - -%closefile tmpFcnBuf -%if !WHITE_SPACE(tmpFcnBuf) - - /* Machine initializer */ - %\ -%endif -%endfunction -%function GlobalMachineInitializer(block) void - %openfile tmpFcnBuf - %\ - %closefile tmpFcnBuf - %return tmpFcnBuf -%endfunction %% GlobalMachineInitializer - -%function DumpMachineTerminator(block) Output -%openfile tmpFcnBuf - -%closefile tmpFcnBuf -%if !WHITE_SPACE(tmpFcnBuf) - - /* Machine initializer */ - %\ -%endif -%endfunction -%function GlobalMachineTerminator(block) void - %openfile tmpFcnBuf - %\ - %closefile tmpFcnBuf - %return tmpFcnBuf -%endfunction %% GlobalMachineTerminator - -%function CacheMachineFunctions(block,system) void - %openfile tmpFcnBuf - - - %closefile tmpFcnBuf - % -%endfunction diff --git a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlh b/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlh deleted file mode 100644 index 6f6b3be..0000000 --- a/bs_touchAndLcd/slprj/_sfprj/socTouchDisplay/_self/rtw/ert/src/socTouchDisplay_rtw.tlh +++ /dev/null @@ -1,41 +0,0 @@ -%implements "machineHeader" "C" -%function CacheOutputs(block,system) void - %assign srcFileName = SLibGetFullFileNameForSystemCode("sys_src_incl", system.SystemIdx) - %assign isWithinReusableSubsys = (LibSystemIsReusedLibraryFcn(System[system.SystemIdx]) || LibSystemIsReusedLibraryFcn(System[System[system.SystemIdx].NonInlinedParentSystemIdx])) -%openfile typedefsBuf - -%closefile typedefsBuf -% -%if !isWithinReusableSubsys && !WHITE_SPACE(typedefsBuf) - % -%endif -%openfile definesBuf -%closefile definesBuf -% -%if !isWithinReusableSubsys && !WHITE_SPACE(definesBuf) - % -%endif -%openfile externDataBuf -%closefile externDataBuf -% -%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf) - % -%endif -%openfile externDataBuf -%closefile externDataBuf -% -%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf) - % -%endif -%openfile externDataBuf - - - -%closefile externDataBuf -% -%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf) - % -%endif -%endfunction %% CacheOutputs - - diff --git a/bs_touchAndLcd/slprj/ert/_sharedutils/shared_file.dmr b/bs_touchAndLcd/slprj/ert/_sharedutils/shared_file.dmr deleted file mode 100644 index 3d8ff7a..0000000 Binary files a/bs_touchAndLcd/slprj/ert/_sharedutils/shared_file.dmr and /dev/null differ diff --git a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/BlockTraceInfo.mat b/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/BlockTraceInfo.mat deleted file mode 100644 index 99ee170..0000000 Binary files a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/BlockTraceInfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/CompileInfo.xml b/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/CompileInfo.xml deleted file mode 100644 index 6daa0c3..0000000 --- a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/CompileInfo.xml +++ /dev/null @@ -1,633 +0,0 @@ - - - - sJSjS2nhFB3Qcky7Q7UDQFE - sKuRTaq5s8EZI5Gj28zXs2E - - [{"Name":"","Profile":""}] - socTouchDisplay - [{"Name":"in_bTouchDetected","Profile":""},{"Name":"ip_u32TouchDuration_msec","Profile":""},{"Name":"ip_u32DisplayDuration_msec","Profile":""},{"Name":"Input","Profile":""},{"Name":"ip_u32canId","Profile":""},{"Name":"op_bDisplayStatus","Profile":""},{"Name":"op_bErrorStatus","Profile":""},{"Name":"op_u8HundredsPlace","Profile":""},{"Name":"op_u8TensPlace","Profile":""},{"Name":"op_u8OnesPlace","Profile":""}] - - - socTouchDisplay - socTouchDisplay - - 100.0 - socTouchDisplay.sldd - socTouchDisplay.sldd - socTouchDisplay.sldd - - - true - socTouchDisplay.sldd - DataDictionary - - - true - base workspace - BaseWorkspace - - socTouchDisplay - - AAFJTQAAAAAOAAAAOAAAAAYAAAAIAAAAAgAAAAAAAAAFAAAACAAAAAAAAAABAAAAAQAAAAAAAAAFAAQAAQAAAAEAAAAAAAAA - {"Inports":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Outports":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","ParameterArguments":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","LocalParameters":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","GlobalParameters":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","InternalData":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","SharedLocalDataStores":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","GlobalDataStores":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Constants":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","DataTransfers":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","ModelData":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","InitializeTerminate":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Execution":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","SharedUtility":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}"} - -1.0 - .1 - #CAN_MESSAGE_BUS#socTouchDisplay.sldd# - #MAX_CAN_MESSAGE_INSTANCE#socTouchDisplay.sldd# - true - true - true - true - true - - true - inf - -inf - 2 - - true - D1 - .1 - 40 - 0 - - - - - - - true - inf - -inf - 2 - 1 - - true - D1 - .1 - 40 - 0 - - - - - - - true - inf - -inf - 2 - 2 - - true - D1 - .1 - 40 - 0 - - - - - - - true - inf - -inf - 2 - 3 - - true - D1 - .1 - 40 - 0 - - - - - - - true - inf - -inf - 2 - 4 - - true - D1 - .1 - 40 - 0 - - - - - - false - true - false - false - false - false - false - false - false - false - false - false - 2 - -1.0 - 5 - 0 - - - - - - false - false - false - false - false - - - - - - - true - inf - -inf - - true - D1 - .1 - 40 - 0 - - - - - - - true - inf - -inf - 1 - - true - D1 - .1 - 40 - 0 - - - - - - - inf - -inf - 2 - - true - D1 - .1 - 40 - 0 - - - - - - - inf - -inf - 3 - - true - D1 - .1 - 40 - 0 - - - - - - - inf - -inf - 4 - - true - D1 - .1 - 40 - 0 - - - - - - true - - true - D1 - .1 - 40 - 0 - - 2 - 323 - <?xml version="1.0"?> -<slexec_sto version="1.1" packageUris="http://schema.mathworks.com/mf0/slexec_mm_sto/R2023a_202208151321"> - <sto.Registry type="sto.Registry" uuid="cd25431f-875e-462e-90e6-77aba17625d3"> - <executionSpec>Undetermined</executionSpec> - <identifier>socTouchDisplay</identifier> - <clockRegistry type="sto.ClockRegistry" uuid="dd27bfe6-2f41-4359-8706-c010ed9dc578"> - <clocks type="sto.Timer" uuid="23b6ef5b-2cde-4de5-8f5c-41238b19192e"> - <clockTickConstraint>PeriodicWithFixedResolution</clockTickConstraint> - <computedFundamentalDiscretePeriod>.1</computedFundamentalDiscretePeriod> - <fastestDiscreteRate type="sto.ClassicPeriodicDiscreteRate" uuid="a4a85346-4500-496a-b655-7c0b2e0a41ce"/> - <isDefaultTimer>true</isDefaultTimer> - <resolution>.1</resolution> - <timeAdvanceMode>FixedStep</timeAdvanceMode> - <identifier>socTouchDisplay::defaultTimer</identifier> - <rates type="sto.ClassicPeriodicDiscreteRate" uuid="a4a85346-4500-496a-b655-7c0b2e0a41ce"> - <annotation>D1</annotation> - <clockId>socTouchDisplay::defaultTimer</clockId> - <description>Discrete 1</description> - <taskId>_task0</taskId> - <rateSpec type="sto.RateSpec" uuid="e2802860-1cd7-4f78-a3ea-f71eeea3095b"> - <period>.1</period> - <rateType>ClassicPeriodicDiscrete</rateType> - </rateSpec> - </rates> - <baseRate type="sto.ClassicPeriodicDiscreteRate" uuid="83ac6bc7-b933-4c64-aaa4-c68795b13cf0"> - <annotation>D1</annotation> - <clockId>socTouchDisplay::defaultTimer</clockId> - <description>Discrete 1</description> - <taskId>_task0</taskId> - <rateSpec type="sto.RateSpec" uuid="a04f93e4-1521-445e-8894-e52d5e91ab8e"> - <period>.1</period> - <rateType>ClassicPeriodicDiscrete</rateType> - </rateSpec> - </baseRate> - </clocks> - <clocks type="sto.Event" uuid="885722a5-c5f4-4bd2-9701-8e7be9b9e22e"> - <eventType>PARAMETER_CHANGE_EVENT</eventType> - <cNum>1</cNum> - <clockType>Event</clockType> - <identifier>ParameterChangeEvent</identifier> - <rates type="sto.ModelWideEventRate" uuid="936e84dc-3ded-47f7-8ab3-c85ff31937e5"> - <clockId>ParameterChangeEvent</clockId> - <rateIdx>-1</rateIdx> - <taskId>ModelWideParameterChangeEvent</taskId> - <useForExecution>NotForExecution</useForExecution> - <rateSpec type="sto.RateSpec" uuid="19ce4db5-4ab9-480c-b5ec-8fffafc7135e"> - <period>inf</period> - <rateType>ModelWideParameterChangeEvent</rateType> - </rateSpec> - </rates> - </clocks> - <timeAdvanceMode>FixedStep</timeAdvanceMode> - </clockRegistry> - <taskRegistry type="sto.TaskRegistry" uuid="0d993ee2-3b65-4573-8898-5196aac386ca"> - <rootTaskHierarchyElements type="sto.Task" uuid="7a8d6f06-f507-4752-b49d-2d40b196b835"> - <isExplicit>true</isExplicit> - <rates type="sto.ModelWideEventRate" uuid="e25b0b14-78dd-4492-8e0f-646a47ceb794"> - <clockId>ParameterChangeEvent</clockId> - <rateIdx>-1</rateIdx> - <taskId>ModelWideParameterChangeEvent</taskId> - <useForExecution>NotForExecution</useForExecution> - <rateSpec type="sto.RateSpec" uuid="f3a4db8e-6eb5-4170-b182-f2fb8ee48e34"> - <period>inf</period> - <rateType>ModelWideParameterChangeEvent</rateType> - </rateSpec> - </rates> - <schedulingClockId>ParameterChangeEvent</schedulingClockId> - <timeKeeperClockId>socTouchDisplay::defaultTimer</timeKeeperClockId> - <elementType>Task</elementType> - <identifier>ModelWideParameterChangeEvent</identifier> - <priority>-1</priority> - </rootTaskHierarchyElements> - <rootTaskHierarchyElements type="sto.Task" uuid="d3bf08c5-2444-421e-8164-08c71bb6edf8"> - <isExecutable>true</isExecutable> - <orderIndex>1</orderIndex> - <rates type="sto.ClassicPeriodicDiscreteRate" uuid="f3a57984-7593-41ca-8198-978ffde0f85d"> - <annotation>D1</annotation> - <clockId>socTouchDisplay::defaultTimer</clockId> - <description>Discrete 1</description> - <taskId>_task0</taskId> - <rateSpec type="sto.RateSpec" uuid="d6123553-da2e-4156-bc60-26c4ac2e0a35"> - <period>.1</period> - <rateType>ClassicPeriodicDiscrete</rateType> - </rateSpec> - </rates> - <schedulingClockId>socTouchDisplay::defaultTimer</schedulingClockId> - <timeKeeperClockId>socTouchDisplay::defaultTimer</timeKeeperClockId> - <elementType>Task</elementType> - <identifier>_task0</identifier> - <priority>40</priority> - </rootTaskHierarchyElements> - <taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="f2944dc6-df54-41da-8274-72899cb2e2c9"> - <clockIdentifier>socTouchDisplay::defaultTimer</clockIdentifier> - <taskIdentifier>_task0</taskIdentifier> - </taskDependencyGraph> - <taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="e0cf3055-a235-4970-a1cf-fff869fdec18"> - <clockIdentifier>ParameterChangeEvent</clockIdentifier> - <taskIdentifier>ModelWideParameterChangeEvent</taskIdentifier> - </taskDependencyGraph> - <taskPriorityDirection>HighNumberLast</taskPriorityDirection> - </taskRegistry> - </sto.Registry> -</slexec_sto> - true - - - - - true - .1 - 2 - true - true - 2 - 1 - FixedStepDiscrete - SOLVER_TYPE_FIXEDSTEP - - 8 - 64 - 32 - 32 - 32 - 64 - 64 - 64 - 16 - 64 - 1 - true - 64 - - - - - - 0 - 1 - 2 - 3 - 4 - 0 - 1 - 2 - 3 - 4 - 0 - 1 - 2 - 3 - 4 - 0 - 1 - 2 - 3 - 4 - - - - - - true - true - true - true - true - - - - - - - - - - - - - 1.0 - .1 - 0.0 - in_bTouchDetected - - - 1.0 - .1 - 0.0 - ip_u32TouchDuration_msec - - - 1.0 - .1 - 0.0 - ip_u32DisplayDuration_msec - - - 10.0 - .1 - 0.0 - CAN_MESSAGE_BUS - Input - - - 1.0 - .1 - 0.0 - uint32 - ip_u32canId - - socTouchDisplay - - 1.0 - .1 - 0.0 - boolean - op_bDisplayStatus - - - 1.0 - .1 - 0.0 - boolean - op_bErrorStatus - - - 1.0 - .1 - 0.0 - uint8 - op_u8HundredsPlace - - - 1.0 - .1 - 0.0 - uint8 - op_u8TensPlace - - - 1.0 - .1 - 0.0 - uint8 - op_u8OnesPlace - - ROOT - - - - - - - - portInput - RootInport - - - portOutput - RootOutport - - - portcanMsg - RootInport - - - portin_bTouchDetected - RootInport - - - portip_u32DisplayDuration_msec - RootInport - - - portip_u32TouchDuration_msec - RootInport - - - portip_u32canId - RootInport - - - portop_bDisplayStatus - RootOutport - - - portop_bErrorStatus - RootOutport - - - portop_bFotaTriggerFromBms - RootOutport - - - portop_bFotaTriggerFromBms1 - RootOutport - - - portop_chErrHundIdx - RootOutport - - - portop_chErrOnesIdx - RootOutport - - - portop_chErrTensIdx - RootOutport - - - portop_errIdx0 - RootOutport - - - portop_errIdx1 - RootOutport - - - portop_errIdx2 - RootOutport - - - portop_u8HundredsPlace - RootOutport - - - portop_u8OnesPlace - RootOutport - - - portop_u8TensPlace - RootOutport - - HighNumberLast - - - true - - - - - false - Default - -2147483648 - - - - false - 1 - true - D1 - 40 - - D1 - -12240129 - true - ClassicPeriodicDiscrete0.10 - 0 - - .1 - - 0 - - - - - - - - - sltpEvents - - - sltpTaskGroups - - - - - D1 - - - socTouchDisplay::defaultTimer - _task0 - - - sltpTasks - - - - - \ No newline at end of file diff --git a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/binfo.mat b/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/binfo.mat deleted file mode 100644 index f70e749..0000000 Binary files a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/binfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/minfo.mat b/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/minfo.mat deleted file mode 100644 index c87adbe..0000000 Binary files a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/minfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/scv b/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/scv deleted file mode 100644 index 421544f..0000000 Binary files a/bs_touchAndLcd/slprj/ert/socTouchDisplay/tmwinternal/scv and /dev/null differ diff --git a/bs_touchAndLcd/slprj/sl_proj.tmw b/bs_touchAndLcd/slprj/sl_proj.tmw deleted file mode 100644 index bbe2087..0000000 --- a/bs_touchAndLcd/slprj/sl_proj.tmw +++ /dev/null @@ -1,2 +0,0 @@ -Simulink Coder project marker file. Please don't change it. -slprjVersion: 23.2_091 \ No newline at end of file diff --git a/bs_touchAndLcd/socTouchDisplay.sldd b/bs_touchAndLcd/socTouchDisplay.sldd deleted file mode 100644 index 7bb12b3..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay.sldd and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay.slx b/bs_touchAndLcd/socTouchDisplay.slx deleted file mode 100644 index e2a29b8..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay.slx and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/buildInfo.mat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/buildInfo.mat deleted file mode 100644 index 9931635..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/buildInfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/codeInfo.mat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/codeInfo.mat deleted file mode 100644 index 208d3cc..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/codeInfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/codedescriptor.dmr b/bs_touchAndLcd/socTouchDisplay_ert_rtw/codedescriptor.dmr deleted file mode 100644 index cb0aec4..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/codedescriptor.dmr and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/compileInfo.mat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/compileInfo.mat deleted file mode 100644 index 6a7279d..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/compileInfo.mat and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/ert_main.c b/bs_touchAndLcd/socTouchDisplay_ert_rtw/ert_main.c deleted file mode 100644 index 974572e..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/ert_main.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * File: ert_main.c - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#include -#include /* This example main program uses printf/fflush */ -#include "socTouchDisplay.h" /* Model header file */ - -/* - * Associating rt_OneStep with a real-time clock or interrupt service routine - * is what makes the generated code "real-time". The function rt_OneStep is - * always associated with the base rate of the model. Subrates are managed - * by the base rate from inside the generated code. Enabling/disabling - * interrupts and floating point context switches are target specific. This - * example code indicates where these should take place relative to executing - * the generated code step function. Overrun behavior should be tailored to - * your application needs. This example simply sets an error status in the - * real-time model and returns from rt_OneStep. - */ -void rt_OneStep(void); -void rt_OneStep(void) -{ - static boolean_T OverrunFlag = false; - - /* Disable interrupts here */ - - /* Check for overrun */ - if (OverrunFlag) { - rtmSetErrorStatus(socTouchDisplay_M, "Overrun"); - return; - } - - OverrunFlag = true; - - /* Save FPU context here (if necessary) */ - /* Re-enable timer or interrupt here */ - /* Set model inputs here */ - - /* Step the model */ - socTouchDisplay_step(); - - /* Get model outputs here */ - - /* Indicate task complete */ - OverrunFlag = false; - - /* Disable interrupts here */ - /* Restore FPU context here (if necessary) */ - /* Enable interrupts here */ -} - -/* - * The example main function illustrates what is required by your - * application code to initialize, execute, and terminate the generated code. - * Attaching rt_OneStep to a real-time clock is target specific. This example - * illustrates how you do this relative to initializing the model. - */ -int_T main(int_T argc, const char *argv[]) -{ - /* Unused arguments */ - (void)(argc); - (void)(argv); - - /* Initialize model */ - socTouchDisplay_initialize(); - - /* Attach rt_OneStep to a timer or interrupt service routine with - * period 0.1 seconds (base rate of the model) here. - * The call syntax for rt_OneStep is - * - * rt_OneStep(); - */ - printf("Warning: The simulation will run forever. " - "Generated ERT main won't simulate model step behavior. " - "To change this behavior select the 'MAT-file logging' option.\n"); - fflush((NULL)); - while (rtmGetErrorStatus(socTouchDisplay_M) == (NULL)) { - /* Perform application tasks here */ - } - - /* Terminate model */ - socTouchDisplay_terminate(); - return 0; -} - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtw_proj.tmw b/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtw_proj.tmw deleted file mode 100644 index c3388f4..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtw_proj.tmw +++ /dev/null @@ -1,4 +0,0 @@ -Simulink Coder project for socTouchDisplay using . MATLAB root = C:\Program Files\MATLAB\R2023b. SimStruct date: 02-Aug-2023 01:53:32 -This file is generated by Simulink Coder for use by the make utility -to determine when to rebuild objects when the name of the current Simulink Coder project changes. -The rtwinfomat located at: ..\slprj\ert\socTouchDisplay\tmwinternal\binfo.mat diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypes.h b/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypes.h deleted file mode 100644 index 5d570f9..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypes.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * File: rtwtypes.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTWTYPES_H -#define RTWTYPES_H - -/* Logical type definitions */ -#if (!defined(__cplusplus)) -#ifndef false -#define false (0U) -#endif - -#ifndef true -#define true (1U) -#endif -#endif - -/*=======================================================================* - * Target hardware information - * Device type: Intel->x86-64 (Windows64) - * Number of bits: char: 8 short: 16 int: 32 - * long: 32 - * native word size: 64 - * Byte ordering: LittleEndian - * Signed integer division rounds to: Zero - * Shift right on a signed integer as arithmetic shift: on - *=======================================================================*/ - -/*=======================================================================* - * Fixed width word size data types: * - * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * - * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * - * real32_T, real64_T - 32 and 64 bit floating point numbers * - *=======================================================================*/ -typedef signed char int8_T; -typedef unsigned char uint8_T; -typedef short int16_T; -typedef unsigned short uint16_T; -typedef int int32_T; -typedef unsigned int uint32_T; -typedef float real32_T; -typedef double real64_T; - -/*===========================================================================* - * Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, * - * real_T, time_T, ulong_T. * - *===========================================================================*/ -typedef double real_T; -typedef double time_T; -typedef unsigned char boolean_T; -typedef int int_T; -typedef unsigned int uint_T; -typedef unsigned long ulong_T; -typedef char char_T; -typedef unsigned char uchar_T; -typedef char_T byte_T; - -/*===========================================================================* - * Complex number type definitions * - *===========================================================================*/ -#define CREAL_T - -typedef struct { - real32_T re; - real32_T im; -} creal32_T; - -typedef struct { - real64_T re; - real64_T im; -} creal64_T; - -typedef struct { - real_T re; - real_T im; -} creal_T; - -#define CINT8_T - -typedef struct { - int8_T re; - int8_T im; -} cint8_T; - -#define CUINT8_T - -typedef struct { - uint8_T re; - uint8_T im; -} cuint8_T; - -#define CINT16_T - -typedef struct { - int16_T re; - int16_T im; -} cint16_T; - -#define CUINT16_T - -typedef struct { - uint16_T re; - uint16_T im; -} cuint16_T; - -#define CINT32_T - -typedef struct { - int32_T re; - int32_T im; -} cint32_T; - -#define CUINT32_T - -typedef struct { - uint32_T re; - uint32_T im; -} cuint32_T; - -/*=======================================================================* - * Min and Max: * - * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * - * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * - *=======================================================================*/ -#define MAX_int8_T ((int8_T)(127)) -#define MIN_int8_T ((int8_T)(-128)) -#define MAX_uint8_T ((uint8_T)(255U)) -#define MAX_int16_T ((int16_T)(32767)) -#define MIN_int16_T ((int16_T)(-32768)) -#define MAX_uint16_T ((uint16_T)(65535U)) -#define MAX_int32_T ((int32_T)(2147483647)) -#define MIN_int32_T ((int32_T)(-2147483647-1)) -#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU)) - -/* Block D-Work pointer type */ -typedef void * pointer_T; - -#endif /* RTWTYPES_H */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypeschksum.mat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypeschksum.mat deleted file mode 100644 index 6f4dd72..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/rtwtypeschksum.mat and /dev/null differ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/setup_mingw.bat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/setup_mingw.bat deleted file mode 100644 index 05b498e..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/setup_mingw.bat +++ /dev/null @@ -1,2 +0,0 @@ -set "MINGW_ROOT=C:\PROGRA~3\MATLAB\SUPPOR~1\R2023b\3P778C~1.INS\MINGW_~1.INS\bin" -@set "PATH=%PATH%;%MINGW_ROOT%" \ No newline at end of file diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.bat b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.bat deleted file mode 100644 index 20cc8d9..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.bat +++ /dev/null @@ -1,13 +0,0 @@ - -call "setup_mingw.bat" - -cd . - -if "%1"=="" ("%MINGW_ROOT%\mingw32-make.exe" -f socTouchDisplay.mk all) else ("%MINGW_ROOT%\mingw32-make.exe" -f socTouchDisplay.mk %1) -@if errorlevel 1 goto error_exit - -exit /B 0 - -:error_exit -echo The make command returned an error of %errorlevel% -exit /B 1 \ No newline at end of file diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.c b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.c deleted file mode 100644 index 746e117..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * File: socTouchDisplay.c - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#include "socTouchDisplay.h" -#include "rtwtypes.h" -#include -#include "socTouchDisplay_private.h" - -/* Named constants for Chart: '/Chart' */ -#define socTouchDi_IN_waitTillNextTouch ((uint8_T)4U) -#define socTouchDis_IN_touchNotDetected ((uint8_T)3U) -#define socTouchDisplay_IN_displayError ((uint8_T)1U) -#define socTouchDisplay_IN_displaySoc ((uint8_T)2U) - -/* Named constants for Chart: '/Chart1' */ -#define socTouchDisplay_IN_bmsPresent ((uint8_T)1U) -#define socTouchDisplay_IN_init ((uint8_T)2U) - -/* Block signals (default storage) */ -B_socTouchDisplay_T socTouchDisplay_B; - -/* Block states (default storage) */ -DW_socTouchDisplay_T socTouchDisplay_DW; - -/* External inputs (root inport signals with default storage) */ -ExtU_socTouchDisplay_T socTouchDisplay_U; - -/* External outputs (root outports fed by signals with default storage) */ -ExtY_socTouchDisplay_T socTouchDisplay_Y; - -/* Real-time model */ -static RT_MODEL_socTouchDisplay_T socTouchDisplay_M_; -RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M = &socTouchDisplay_M_; - -/* Model step function */ -void socTouchDisplay_step(void) -{ - int32_T i; - int32_T s3_iter; - uint32_T tmp; - uint8_T rtb_Cast; - boolean_T Memory_PreviousInput; - boolean_T rtb_Equal; - boolean_T rtb_Memory; - - /* Outputs for Iterator SubSystem: '/canMsgDecode' incorporates: - * ForIterator: '/For Iterator' - */ - /* InitializeConditions for Memory: '/Memory' */ - Memory_PreviousInput = false; - for (s3_iter = 0; s3_iter < 10; s3_iter++) { - /* Selector: '/Selector' incorporates: - * Inport: '/Input' - */ - socTouchDisplay_B.Selector = socTouchDisplay_U.Input[s3_iter]; - - /* S-Function (canReceive): '/S-Function' */ - canReceive_Outputs_wrapper(&socTouchDisplay_B.Selector.ID, - &socTouchDisplay_B.Selector.Length, &socTouchDisplay_B.Selector.Data[0], - &socTouchDisplay_B.SFunction); - - /* RelationalOperator: '/Equal' incorporates: - * Inport: '/ip_u32canId' - */ - rtb_Equal = (socTouchDisplay_B.SFunction.ID == socTouchDisplay_U.ip_u32canId); - - /* Outputs for Enabled SubSystem: '/Enabled Subsystem' incorporates: - * EnablePort: '/Enable' - */ - /* Logic: '/AND' incorporates: - * Constant: '/Constant' - * RelationalOperator: '/Equal1' - */ - if ((socTouchDisplay_B.SFunction.Data[0] == 2) && rtb_Equal) { - for (i = 0; i < 8; i++) { - /* SignalConversion generated from: '/In1' */ - socTouchDisplay_B.In1[i] = socTouchDisplay_B.SFunction.Data[i]; - } - } - - /* End of Logic: '/AND' */ - /* End of Outputs for SubSystem: '/Enabled Subsystem' */ - - /* DataTypeConversion: '/Cast' */ - rtb_Cast = socTouchDisplay_B.In1[2]; - - /* Memory: '/Memory' */ - rtb_Memory = Memory_PreviousInput; - - /* Update for Memory: '/Memory' incorporates: - * Logic: '/OR' - */ - Memory_PreviousInput = (rtb_Equal || Memory_PreviousInput); - } - - /* End of Outputs for SubSystem: '/canMsgDecode' */ - - /* Chart: '/Chart1' */ - if (socTouchDisplay_DW.is_active_c1_socTouchDisplay == 0U) { - socTouchDisplay_DW.is_active_c1_socTouchDisplay = 1U; - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_init; - Memory_PreviousInput = false; - } else if (socTouchDisplay_DW.is_c1_socTouchDisplay == - socTouchDisplay_IN_bmsPresent) { - Memory_PreviousInput = true; - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_1 = 0U; - } - - if (socTouchDisplay_DW.durationCounter_1 > 150U) { - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_init; - Memory_PreviousInput = false; - } - } else { - /* case IN_init: */ - Memory_PreviousInput = false; - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_1 = 0U; - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_bmsPresent; - Memory_PreviousInput = true; - } - } - - if (!rtb_Memory) { - socTouchDisplay_DW.durationCounter_1++; - } else { - socTouchDisplay_DW.durationCounter_1 = 0U; - } - - /* End of Chart: '/Chart1' */ - - /* Chart: '/Chart' incorporates: - * Inport: '/in_bTouchDetected' - * Inport: '/ip_u32DisplayDuration_msec' - * Inport: '/ip_u32TouchDuration_msec' - */ - if (socTouchDisplay_DW.temporalCounter_i1 < MAX_uint32_T) { - socTouchDisplay_DW.temporalCounter_i1++; - } - - if (socTouchDisplay_DW.is_active_c3_socTouchDisplay == 0U) { - socTouchDisplay_DW.is_active_c3_socTouchDisplay = 1U; - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_g = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = socTouchDis_IN_touchNotDetected; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } else { - switch (socTouchDisplay_DW.is_c3_socTouchDisplay) { - case socTouchDisplay_IN_displayError: - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = true; - if ((uint32_T)((int32_T)socTouchDisplay_DW.temporalCounter_i1 * 100) >= - (uint32_T)ceil(socTouchDisplay_U.ip_u32DisplayDuration_msec)) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDi_IN_waitTillNextTouch; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } - break; - - case socTouchDisplay_IN_displaySoc: - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = true; - if ((uint32_T)((int32_T)socTouchDisplay_DW.temporalCounter_i1 * 100) >= - (uint32_T)ceil(socTouchDisplay_U.ip_u32DisplayDuration_msec)) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDi_IN_waitTillNextTouch; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } - break; - - case socTouchDis_IN_touchNotDetected: - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - rtb_Memory = !(socTouchDisplay_U.in_bTouchDetected == 1.0); - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_2 = 0U; - } - - tmp = (uint32_T)ceil(socTouchDisplay_U.ip_u32TouchDuration_msec); - if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_2 * 100) > tmp) - && Memory_PreviousInput) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = socTouchDisplay_IN_displaySoc; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = true; - } else { - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_1_g = 0U; - } - - if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_1_g * 100) > - tmp) && (!Memory_PreviousInput)) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDisplay_IN_displayError; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = true; - } - } - break; - - default: - /* Outport: '/op_bDisplayStatus' */ - /* case IN_waitTillNextTouch: */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - if (socTouchDisplay_DW.temporalCounter_i1 >= 100U) { - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_g = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDis_IN_touchNotDetected; - } - break; - } - } - - if (socTouchDisplay_U.in_bTouchDetected == 1.0) { - socTouchDisplay_DW.durationCounter_1_g++; - socTouchDisplay_DW.durationCounter_2++; - } else { - socTouchDisplay_DW.durationCounter_1_g = 0U; - socTouchDisplay_DW.durationCounter_2 = 0U; - } - - /* End of Chart: '/Chart' */ - - /* Outputs for Atomic SubSystem: '/displayData' */ - /* Switch: '/Switch1' incorporates: - * Outport: '/op_bErrorStatus' - * Switch: '/Switch' - * Switch: '/Switch2' - */ - if (socTouchDisplay_Y.op_bErrorStatus) { - /* Outport: '/op_u8TensPlace' incorporates: - * Constant: '/Constant3' - */ - socTouchDisplay_Y.op_u8TensPlace = 114U; - - /* Outport: '/op_u8OnesPlace' incorporates: - * Constant: '/Constant4' - */ - socTouchDisplay_Y.op_u8OnesPlace = 114U; - - /* Outport: '/op_u8HundredsPlace' incorporates: - * Constant: '/Constant2' - */ - socTouchDisplay_Y.op_u8HundredsPlace = 69U; - } else { - /* Outport: '/op_u8TensPlace' incorporates: - * Constant: '/Constant' - * Math: '/Mod1' - * Product: '/Divide' - */ - socTouchDisplay_Y.op_u8TensPlace = (uint8_T)((int32_T)(rtb_Cast / 10U) % 10); - - /* Outport: '/op_u8OnesPlace' incorporates: - * Math: '/Mod2' - */ - socTouchDisplay_Y.op_u8OnesPlace = (uint8_T)(rtb_Cast % 10); - - /* Outport: '/op_u8HundredsPlace' incorporates: - * Constant: '/Constant1' - * Math: '/Mod' - * Product: '/Divide1' - */ - socTouchDisplay_Y.op_u8HundredsPlace = (uint8_T)((int32_T)(rtb_Cast / 100U) % - 10); - } - - /* End of Switch: '/Switch1' */ - /* End of Outputs for SubSystem: '/displayData' */ -} - -/* Model initialize function */ -void socTouchDisplay_initialize(void) -{ - /* (no initialization code required) */ -} - -/* Model terminate function */ -void socTouchDisplay_terminate(void) -{ - /* (no terminate code required) */ -} - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.h b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.h deleted file mode 100644 index aba0a60..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * File: socTouchDisplay.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_h_ -#define RTW_HEADER_socTouchDisplay_h_ -#ifndef socTouchDisplay_COMMON_INCLUDES_ -#define socTouchDisplay_COMMON_INCLUDES_ -#include "rtwtypes.h" -#endif /* socTouchDisplay_COMMON_INCLUDES_ */ - -#include "socTouchDisplay_types.h" -#include "ivec_rte_dummy.h" - -/* Macros for accessing real-time model data structure */ -#ifndef rtmGetErrorStatus -#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) -#endif - -#ifndef rtmSetErrorStatus -#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) -#endif - -/* Block signals (default storage) */ -typedef struct { - CAN_MESSAGE_BUS Selector; /* '/Selector' */ - CAN_MESSAGE_BUS SFunction; /* '/S-Function' */ - uint8_T In1[8]; /* '/In1' */ -} B_socTouchDisplay_T; - -/* Block states (default storage) for system '' */ -typedef struct { - void* SFunction_canFrameBUS; /* '/S-Function' */ - uint32_T durationCounter_1; /* '/Chart1' */ - uint32_T temporalCounter_i1; /* '/Chart' */ - uint32_T durationCounter_1_g; /* '/Chart' */ - uint32_T durationCounter_2; /* '/Chart' */ - uint8_T is_active_c1_socTouchDisplay;/* '/Chart1' */ - uint8_T is_c1_socTouchDisplay; /* '/Chart1' */ - uint8_T is_active_c3_socTouchDisplay;/* '/Chart' */ - uint8_T is_c3_socTouchDisplay; /* '/Chart' */ -} DW_socTouchDisplay_T; - -/* External inputs (root inport signals with default storage) */ -typedef struct { - real_T in_bTouchDetected; /* '/in_bTouchDetected' */ - real_T ip_u32TouchDuration_msec; /* '/ip_u32TouchDuration_msec' */ - real_T ip_u32DisplayDuration_msec; /* '/ip_u32DisplayDuration_msec' */ - CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '/Input' */ - uint32_T ip_u32canId; /* '/ip_u32canId' */ -} ExtU_socTouchDisplay_T; - -/* External outputs (root outports fed by signals with default storage) */ -typedef struct { - boolean_T op_bDisplayStatus; /* '/op_bDisplayStatus' */ - boolean_T op_bErrorStatus; /* '/op_bErrorStatus' */ - uint8_T op_u8HundredsPlace; /* '/op_u8HundredsPlace' */ - uint8_T op_u8TensPlace; /* '/op_u8TensPlace' */ - uint8_T op_u8OnesPlace; /* '/op_u8OnesPlace' */ -} ExtY_socTouchDisplay_T; - -/* Real-time Model Data Structure */ -struct tag_RTM_socTouchDisplay_T { - const char_T * volatile errorStatus; -}; - -/* Block signals (default storage) */ -extern B_socTouchDisplay_T socTouchDisplay_B; - -/* Block states (default storage) */ -extern DW_socTouchDisplay_T socTouchDisplay_DW; - -/* External inputs (root inport signals with default storage) */ -extern ExtU_socTouchDisplay_T socTouchDisplay_U; - -/* External outputs (root outports fed by signals with default storage) */ -extern ExtY_socTouchDisplay_T socTouchDisplay_Y; - -/* Model entry point functions */ -extern void socTouchDisplay_initialize(void); -extern void socTouchDisplay_step(void); -extern void socTouchDisplay_terminate(void); - -/* Real-time Model object */ -extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M; - -/*- - * These blocks were eliminated from the model due to optimizations: - * - * Block '/Cast' : Eliminate redundant data type conversion - * Block '/Cast1' : Eliminate redundant data type conversion - * Block '/Cast2' : Eliminate redundant data type conversion - */ - -/*- - * The generated code includes comments that allow you to trace directly - * back to the appropriate location in the model. The basic format - * is /block_name, where system is the system number (uniquely - * assigned by Simulink) and block_name is the name of the block. - * - * Use the MATLAB hilite_system command to trace the generated code back - * to the model. For example, - * - * hilite_system('') - opens system 3 - * hilite_system('/Kp') - opens and selects block Kp which resides in S3 - * - * Here is the system hierarchy for this model - * - * '' : 'socTouchDisplay' - * '' : 'socTouchDisplay/Chart' - * '' : 'socTouchDisplay/Chart1' - * '' : 'socTouchDisplay/canMsgDecode' - * '' : 'socTouchDisplay/displayData' - * '' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem' - */ -#endif /* RTW_HEADER_socTouchDisplay_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.mk b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.mk deleted file mode 100644 index 196814f..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.mk +++ /dev/null @@ -1,567 +0,0 @@ -########################################################################### -## Makefile generated for component 'socTouchDisplay'. -## -## Makefile : socTouchDisplay.mk -## Generated on : Thu Nov 07 22:32:48 2024 -## Final product: $(RELATIVE_PATH_TO_ANCHOR)/socTouchDisplay.exe -## Product type : executable -## -########################################################################### - -########################################################################### -## MACROS -########################################################################### - -# Macro Descriptions: -# PRODUCT_NAME Name of the system to build -# MAKEFILE Name of this makefile -# COMPILER_COMMAND_FILE Compiler command listing model reference header paths -# CMD_FILE Command file - -PRODUCT_NAME = socTouchDisplay -MAKEFILE = socTouchDisplay.mk -MATLAB_ROOT = C:/PROGRA~1/MATLAB/R2023b -MATLAB_BIN = C:/PROGRA~1/MATLAB/R2023b/bin -MATLAB_ARCH_BIN = $(MATLAB_BIN)/win64 -START_DIR = D:/AAR/cantouart_ti/bs_touchAndLcd -SOLVER = -SOLVER_OBJ = -CLASSIC_INTERFACE = 0 -TGT_FCN_LIB = ISO_C -MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0 -RELATIVE_PATH_TO_ANCHOR = .. -COMPILER_COMMAND_FILE = socTouchDisplay_comp.rsp -CMD_FILE = socTouchDisplay.rsp -C_STANDARD_OPTS = -fwrapv -CPP_STANDARD_OPTS = -fwrapv - -########################################################################### -## TOOLCHAIN SPECIFICATIONS -########################################################################### - -# Toolchain Name: MinGW64 | gmake (64-bit Windows) -# Supported Version(s): 8.x -# ToolchainInfo Version: 2023b -# Specification Revision: 1.0 -# -#------------------------------------------- -# Macros assumed to be defined elsewhere -#------------------------------------------- - -# C_STANDARD_OPTS -# CPP_STANDARD_OPTS -# MINGW_ROOT -# MINGW_C_STANDARD_OPTS - -#----------- -# MACROS -#----------- - -WARN_FLAGS = -Wall -W -Wwrite-strings -Winline -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -WARN_FLAGS_MAX = $(WARN_FLAGS) -Wcast-qual -Wshadow -CPP_WARN_FLAGS = -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -CPP_WARN_FLAGS_MAX = $(CPP_WARN_FLAGS) -Wcast-qual -Wshadow -MW_EXTERNLIB_DIR = $(MATLAB_ROOT)/extern/lib/win64/mingw64 -SHELL = %SystemRoot%/system32/cmd.exe - -TOOLCHAIN_SRCS = -TOOLCHAIN_INCS = -TOOLCHAIN_LIBS = -lws2_32 - -#------------------------ -# BUILD TOOL COMMANDS -#------------------------ - -# C Compiler: GNU C Compiler -CC_PATH = $(MINGW_ROOT) -CC = "$(CC_PATH)/gcc" - -# Linker: GNU Linker -LD_PATH = $(MINGW_ROOT) -LD = "$(LD_PATH)/g++" - -# C++ Compiler: GNU C++ Compiler -CPP_PATH = $(MINGW_ROOT) -CPP = "$(CPP_PATH)/g++" - -# C++ Linker: GNU C++ Linker -CPP_LD_PATH = $(MINGW_ROOT) -CPP_LD = "$(CPP_LD_PATH)/g++" - -# Archiver: GNU Archiver -AR_PATH = $(MINGW_ROOT) -AR = "$(AR_PATH)/ar" - -# MEX Tool: MEX Tool -MEX_PATH = $(MATLAB_ARCH_BIN) -MEX = "$(MEX_PATH)/mex" - -# Download: Download -DOWNLOAD = - -# Execute: Execute -EXECUTE = $(PRODUCT) - -# Builder: GMAKE Utility -MAKE_PATH = $(MINGW_ROOT) -MAKE = "$(MAKE_PATH)/mingw32-make.exe" - - -#------------------------- -# Directives/Utilities -#------------------------- - -CDEBUG = -g -C_OUTPUT_FLAG = -o -LDDEBUG = -g -OUTPUT_FLAG = -o -CPPDEBUG = -g -CPP_OUTPUT_FLAG = -o -CPPLDDEBUG = -g -OUTPUT_FLAG = -o -ARDEBUG = -STATICLIB_OUTPUT_FLAG = -MEX_DEBUG = -g -RM = @del -ECHO = @echo -MV = @move -RUN = - -#---------------------------------------- -# "Faster Builds" Build Configuration -#---------------------------------------- - -ARFLAGS = ruvs -CFLAGS = -c $(MINGW_C_STANDARD_OPTS) -m64 \ - -O0 -CPPFLAGS = -c $(CPP_STANDARD_OPTS) -m64 \ - -O0 -CPP_LDFLAGS = -static -m64 -CPP_SHAREDLIB_LDFLAGS = -shared -Wl,--no-undefined \ - -Wl,--out-implib,$(notdir $(basename $(PRODUCT))).lib -DOWNLOAD_FLAGS = -EXECUTE_FLAGS = -LDFLAGS = -static -m64 -MEX_CPPFLAGS = -MEX_CPPLDFLAGS = -MEX_CFLAGS = -MEX_LDFLAGS = -MAKE_FLAGS = -f $(MAKEFILE) -SHAREDLIB_LDFLAGS = -shared -Wl,--no-undefined \ - -Wl,--out-implib,$(notdir $(basename $(PRODUCT))).lib - - - -########################################################################### -## OUTPUT INFO -########################################################################### - -PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)/socTouchDisplay.exe -PRODUCT_TYPE = "executable" -BUILD_TYPE = "Top-Level Standalone Executable" - -########################################################################### -## INCLUDE PATHS -########################################################################### - -INCLUDES_BUILDINFO = - -INCLUDES = $(INCLUDES_BUILDINFO) - -########################################################################### -## DEFINES -########################################################################### - -DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DEFINES_CUSTOM = -DEFINES_OPTS = -DTID01EQ=0 -DEFINES_STANDARD = -DMODEL=socTouchDisplay -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 - -DEFINES = $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_STANDARD) - -########################################################################### -## SOURCE FILES -########################################################################### - -SRCS = $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c - -MAIN_SRC = $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c - -ALL_SRCS = $(SRCS) $(MAIN_SRC) - -########################################################################### -## OBJECTS -########################################################################### - -OBJS = socTouchDisplay.obj - -MAIN_OBJ = ert_main.obj - -ALL_OBJS = $(OBJS) $(MAIN_OBJ) - -########################################################################### -## PREBUILT OBJECT FILES -########################################################################### - -PREBUILT_OBJS = - -########################################################################### -## LIBRARIES -########################################################################### - -LIBS = - -########################################################################### -## SYSTEM LIBRARIES -########################################################################### - -SYSTEM_LIBS = - -########################################################################### -## ADDITIONAL TOOLCHAIN FLAGS -########################################################################### - -#--------------- -# C Compiler -#--------------- - -CFLAGS_TFL = -msse2 -CFLAGS_BASIC = $(DEFINES) $(INCLUDES) @$(COMPILER_COMMAND_FILE) - -CFLAGS += $(CFLAGS_TFL) $(CFLAGS_BASIC) - -#----------------- -# C++ Compiler -#----------------- - -CPPFLAGS_TFL = -msse2 -CPPFLAGS_BASIC = $(DEFINES) $(INCLUDES) @$(COMPILER_COMMAND_FILE) - -CPPFLAGS += $(CPPFLAGS_TFL) $(CPPFLAGS_BASIC) - -#--------------------- -# MEX C++ Compiler -#--------------------- - -MEX_CPP_Compiler_BASIC = @$(COMPILER_COMMAND_FILE) - -MEX_CPPFLAGS += $(MEX_CPP_Compiler_BASIC) - -#----------------- -# MEX Compiler -#----------------- - -MEX_Compiler_BASIC = @$(COMPILER_COMMAND_FILE) - -MEX_CFLAGS += $(MEX_Compiler_BASIC) - -########################################################################### -## INLINED COMMANDS -########################################################################### - - -MINGW_C_STANDARD_OPTS = $(C_STANDARD_OPTS) - - -########################################################################### -## PHONY TARGETS -########################################################################### - -.PHONY : all build buildobj clean info prebuild download execute - - -all : build - @echo "### Successfully generated all binary outputs." - - -build : prebuild $(PRODUCT) - - -buildobj : prebuild $(OBJS) $(PREBUILT_OBJS) - @echo "### Successfully generated all binary outputs." - - -prebuild : - - -download : $(PRODUCT) - - -execute : download - @echo "### Invoking postbuild tool "Execute" ..." - $(EXECUTE) $(EXECUTE_FLAGS) - @echo "### Done invoking postbuild tool." - - -########################################################################### -## FINAL TARGET -########################################################################### - -#------------------------------------------- -# Create a standalone executable -#------------------------------------------- - -$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(MAIN_OBJ) - @echo "### Creating standalone executable "$(PRODUCT)" ..." - $(LD) $(LDFLAGS) -o $(PRODUCT) @$(CMD_FILE) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS) - @echo "### Created: $(PRODUCT)" - - -########################################################################### -## INTERMEDIATE TARGETS -########################################################################### - -#--------------------- -# SOURCE-TO-OBJECT -#--------------------- - -%.obj : %.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : %.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : %.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : %.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : %.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : %.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : %.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/rtw/c/src/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/simulink/src/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cpp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cc - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cp - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cxx - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.CPP - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.c++ - $(CPP) $(CPPFLAGS) -o "$@" "$<" - - -ert_main.obj : $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -socTouchDisplay.obj : $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c - $(CC) $(CFLAGS) -o "$@" "$<" - - -########################################################################### -## DEPENDENCIES -########################################################################### - -$(ALL_OBJS) : rtw_proj.tmw $(COMPILER_COMMAND_FILE) $(MAKEFILE) - - -########################################################################### -## MISCELLANEOUS TARGETS -########################################################################### - -info : - @echo "### PRODUCT = $(PRODUCT)" - @echo "### PRODUCT_TYPE = $(PRODUCT_TYPE)" - @echo "### BUILD_TYPE = $(BUILD_TYPE)" - @echo "### INCLUDES = $(INCLUDES)" - @echo "### DEFINES = $(DEFINES)" - @echo "### ALL_SRCS = $(ALL_SRCS)" - @echo "### ALL_OBJS = $(ALL_OBJS)" - @echo "### LIBS = $(LIBS)" - @echo "### MODELREF_LIBS = $(MODELREF_LIBS)" - @echo "### SYSTEM_LIBS = $(SYSTEM_LIBS)" - @echo "### TOOLCHAIN_LIBS = $(TOOLCHAIN_LIBS)" - @echo "### CFLAGS = $(CFLAGS)" - @echo "### LDFLAGS = $(LDFLAGS)" - @echo "### SHAREDLIB_LDFLAGS = $(SHAREDLIB_LDFLAGS)" - @echo "### CPPFLAGS = $(CPPFLAGS)" - @echo "### CPP_LDFLAGS = $(CPP_LDFLAGS)" - @echo "### CPP_SHAREDLIB_LDFLAGS = $(CPP_SHAREDLIB_LDFLAGS)" - @echo "### ARFLAGS = $(ARFLAGS)" - @echo "### MEX_CFLAGS = $(MEX_CFLAGS)" - @echo "### MEX_CPPFLAGS = $(MEX_CPPFLAGS)" - @echo "### MEX_LDFLAGS = $(MEX_LDFLAGS)" - @echo "### MEX_CPPLDFLAGS = $(MEX_CPPLDFLAGS)" - @echo "### DOWNLOAD_FLAGS = $(DOWNLOAD_FLAGS)" - @echo "### EXECUTE_FLAGS = $(EXECUTE_FLAGS)" - @echo "### MAKE_FLAGS = $(MAKE_FLAGS)" - - -clean : - $(ECHO) "### Deleting all derived files ..." - $(RM) $(subst /,\,$(PRODUCT)) - $(RM) $(subst /,\,$(ALL_OBJS)) - $(ECHO) "### Deleted all derived files." - - diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.rsp b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.rsp deleted file mode 100644 index 764f2a3..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay.rsp +++ /dev/null @@ -1,2 +0,0 @@ -ert_main.obj -socTouchDisplay.obj diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_comp.rsp b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_comp.rsp deleted file mode 100644 index 38460a8..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_comp.rsp +++ /dev/null @@ -1,7 +0,0 @@ --ID:/AAR/cantouart_ti/bs_touchAndLcd --ID:/AAR/cantouart_ti/bs_touchAndLcd/socTouchDisplay_ert_rtw --IC:/Program\ Files/MATLAB/R2023b/extern/include --IC:/Program\ Files/MATLAB/R2023b/simulink/include --IC:/Program\ Files/MATLAB/R2023b/rtw/c/src --IC:/Program\ Files/MATLAB/R2023b/rtw/c/src/ext_mode/common --IC:/Program\ Files/MATLAB/R2023b/rtw/c/ert diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_private.h b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_private.h deleted file mode 100644 index 9b74ee1..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_private.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * File: socTouchDisplay_private.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_private_h_ -#define RTW_HEADER_socTouchDisplay_private_h_ -#include "rtwtypes.h" -#include "socTouchDisplay_types.h" -#ifdef __cplusplus -#define SFB_EXTERN_C extern "C" -#else -#define SFB_EXTERN_C extern -#endif - -SFB_EXTERN_C void canReceive_Start_wrapper(void); -SFB_EXTERN_C void canReceive_Outputs_wrapper(const uint32_T *id, - const uint8_T *dlc, - const uint8_T *data, - CAN_MESSAGE_BUS *canFrame); -SFB_EXTERN_C void canReceive_Terminate_wrapper(void); - -#undef SFB_EXTERN_C -#endif /* RTW_HEADER_socTouchDisplay_private_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_ref.rsp b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_ref.rsp deleted file mode 100644 index e69de29..0000000 diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_types.h b/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_types.h deleted file mode 100644 index 07a7b29..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/socTouchDisplay_types.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * File: socTouchDisplay_types.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.111 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Thu Nov 7 22:32:36 2024 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_types_h_ -#define RTW_HEADER_socTouchDisplay_types_h_ -#include "rtwtypes.h" - -/* Includes for objects with custom storage classes */ -#include "ivec_rte_dummy.h" - -/* - * Check that imported macros with storage class "ImportedDefine" are defined - */ -#ifndef MAX_CAN_MESSAGE_INSTANCE -#error The value of parameter "MAX_CAN_MESSAGE_INSTANCE" is not defined -#endif - -/* - * Registered constraints for dimension variants - */ -/* Constraint 'MAX_CAN_MESSAGE_INSTANCE == 10' registered by: - * '/ip_xCanMsg' - */ -#if MAX_CAN_MESSAGE_INSTANCE != 10 -# error "The preprocessor definition 'MAX_CAN_MESSAGE_INSTANCE' must be equal to '10'" -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ -#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ - -typedef struct { - uint8_T Extended; - uint8_T Length; - uint8_T Remote; - uint8_T Error; - uint32_T ID; - real_T Timestamp; - uint8_T Data[8]; -} CAN_MESSAGE_BUS; - -#endif - -/* Forward declaration for rtModel */ -typedef struct tag_RTM_socTouchDisplay_T RT_MODEL_socTouchDisplay_T; - -#endif /* RTW_HEADER_socTouchDisplay_types_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/simulink_cache.xml b/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/simulink_cache.xml deleted file mode 100644 index 0b3422a..0000000 --- a/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/simulink_cache.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - 8bTFSfmqHVlYhNqKtSda3c/Kq/qLr9+hTAYNegrcsTT+6h7F5vQznuwmUe5uezw4aTCxAwaPBDr/BUHto5jDVQ== - - \ No newline at end of file diff --git a/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/tr b/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/tr deleted file mode 100644 index 4a193df..0000000 Binary files a/bs_touchAndLcd/socTouchDisplay_ert_rtw/tmwinternal/tr and /dev/null differ diff --git a/ivec_APP/inc/socTouchDisplay.h b/ivec_APP/inc/socTouchDisplay.h deleted file mode 100644 index b7921d2..0000000 --- a/ivec_APP/inc/socTouchDisplay.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * File: socTouchDisplay.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.140 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Mon Jan 20 13:31:03 2025 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_h_ -#define RTW_HEADER_socTouchDisplay_h_ -#ifndef socTouchDisplay_COMMON_INCLUDES_ -#define socTouchDisplay_COMMON_INCLUDES_ -#include "rtwtypes.h" -#endif /* socTouchDisplay_COMMON_INCLUDES_ */ - -#include "socTouchDisplay_types.h" -#include "ivec_rte_dummy.h" - -/* Macros for accessing real-time model data structure */ -#ifndef rtmGetErrorStatus -#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) -#endif - -#ifndef rtmSetErrorStatus -#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) -#endif - -/* Block signals (default storage) */ -typedef struct { - CAN_MESSAGE_BUS Selector; /* '/Selector' */ - CAN_MESSAGE_BUS SFunction; /* '/S-Function' */ - uint8_T In1[8]; /* '/In1' */ - boolean_T Compare; /* '/Compare' */ -} B_socTouchDisplay_T; - -/* Block states (default storage) for system '' */ -typedef struct { - void* SFunction_canFrameBUS; /* '/S-Function' */ - uint32_T durationCounter_1; /* '/Chart1' */ - uint32_T temporalCounter_i1; /* '/Chart' */ - uint32_T durationCounter_1_l; /* '/Chart' */ - uint32_T durationCounter_2; /* '/Chart' */ - uint32_T durationCounter_1_a; /* '/Chart' */ - uint8_T is_active_c1_socTouchDisplay;/* '/Chart1' */ - uint8_T is_c1_socTouchDisplay; /* '/Chart1' */ - uint8_T is_active_c3_socTouchDisplay;/* '/Chart' */ - uint8_T is_c3_socTouchDisplay; /* '/Chart' */ - uint8_T is_chargingMode; /* '/Chart' */ -} DW_socTouchDisplay_T; - -/* External inputs (root inport signals with default storage) */ -typedef struct { - real_T in_bTouchDetected; /* '/in_bTouchDetected' */ - real_T ip_u32TouchDuration_msec; /* '/ip_u32TouchDuration_msec' */ - real_T ip_u32DisplayDuration_msec; /* '/ip_u32DisplayDuration_msec' */ - CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '/Input' */ - uint32_T ip_u32canId; /* '/ip_u32canId' */ -} ExtU_socTouchDisplay_T; - -/* External outputs (root outports fed by signals with default storage) */ -typedef struct { - boolean_T op_bDisplayStatus; /* '/op_bDisplayStatus' */ - boolean_T op_bErrorStatus; /* '/op_bErrorStatus' */ - uint8_T op_u8HundredsPlace; /* '/op_u8HundredsPlace' */ - uint8_T op_u8TensPlace; /* '/op_u8TensPlace' */ - uint8_T op_u8OnesPlace; /* '/op_u8OnesPlace' */ -} ExtY_socTouchDisplay_T; - -/* Real-time Model Data Structure */ -struct tag_RTM_socTouchDisplay_T { - const char_T * volatile errorStatus; -}; - -/* Block signals (default storage) */ -extern B_socTouchDisplay_T socTouchDisplay_B; - -/* Block states (default storage) */ -extern DW_socTouchDisplay_T socTouchDisplay_DW; - -/* External inputs (root inport signals with default storage) */ -extern ExtU_socTouchDisplay_T socTouchDisplay_U; - -/* External outputs (root outports fed by signals with default storage) */ -extern ExtY_socTouchDisplay_T socTouchDisplay_Y; - -/* Model entry point functions */ -extern void socTouchDisplay_initialize(void); -extern void socTouchDisplay_step(void); -extern void socTouchDisplay_terminate(void); - -/* Real-time Model object */ -extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M; - -/*- - * These blocks were eliminated from the model due to optimizations: - * - * Block '/Cast' : Eliminate redundant data type conversion - * Block '/Cast1' : Eliminate redundant data type conversion - * Block '/Cast2' : Eliminate redundant data type conversion - */ - -/*- - * The generated code includes comments that allow you to trace directly - * back to the appropriate location in the model. The basic format - * is /block_name, where system is the system number (uniquely - * assigned by Simulink) and block_name is the name of the block. - * - * Use the MATLAB hilite_system command to trace the generated code back - * to the model. For example, - * - * hilite_system('') - opens system 3 - * hilite_system('/Kp') - opens and selects block Kp which resides in S3 - * - * Here is the system hierarchy for this model - * - * '' : 'socTouchDisplay' - * '' : 'socTouchDisplay/Chart' - * '' : 'socTouchDisplay/Chart1' - * '' : 'socTouchDisplay/canMsgDecode' - * '' : 'socTouchDisplay/displayData' - * '' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem' - * '' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem1' - * '' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem1/Compare To Constant' - */ -#endif /* RTW_HEADER_socTouchDisplay_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/ivec_APP/inc/socTouchDisplay_private.h b/ivec_APP/inc/socTouchDisplay_private.h deleted file mode 100644 index ef8e971..0000000 --- a/ivec_APP/inc/socTouchDisplay_private.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * File: socTouchDisplay_private.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.133 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Sat Jan 18 20:05:13 2025 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_private_h_ -#define RTW_HEADER_socTouchDisplay_private_h_ -#include "rtwtypes.h" -#include "socTouchDisplay_types.h" -#ifdef __cplusplus -#define SFB_EXTERN_C extern "C" -#else -#define SFB_EXTERN_C extern -#endif - -SFB_EXTERN_C void canReceive_Start_wrapper(void); -SFB_EXTERN_C void canReceive_Outputs_wrapper(const uint32_T *id, - const uint8_T *dlc, - const uint8_T *data, - CAN_MESSAGE_BUS *canFrame); -SFB_EXTERN_C void canReceive_Terminate_wrapper(void); - -#undef SFB_EXTERN_C -#endif /* RTW_HEADER_socTouchDisplay_private_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/ivec_APP/inc/socTouchDisplay_types.h b/ivec_APP/inc/socTouchDisplay_types.h deleted file mode 100644 index e29187a..0000000 --- a/ivec_APP/inc/socTouchDisplay_types.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * File: socTouchDisplay_types.h - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.133 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Sat Jan 18 20:05:13 2025 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef RTW_HEADER_socTouchDisplay_types_h_ -#define RTW_HEADER_socTouchDisplay_types_h_ -#include "rtwtypes.h" - -/* Includes for objects with custom storage classes */ -#include "ivec_rte_dummy.h" - -/* - * Check that imported macros with storage class "ImportedDefine" are defined - */ -#ifndef MAX_CAN_MESSAGE_INSTANCE -#error The value of parameter "MAX_CAN_MESSAGE_INSTANCE" is not defined -#endif - -/* - * Registered constraints for dimension variants - */ -/* Constraint 'MAX_CAN_MESSAGE_INSTANCE == 10' registered by: - * '/ip_xCanMsg' - */ -#if MAX_CAN_MESSAGE_INSTANCE != 10 -# error "The preprocessor definition 'MAX_CAN_MESSAGE_INSTANCE' must be equal to '10'" -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ -#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_ - -typedef struct { - uint8_T Extended; - uint8_T Length; - uint8_T Remote; - uint8_T Error; - uint32_T ID; - real_T Timestamp; - uint8_T Data[8]; -} CAN_MESSAGE_BUS; - -#endif - -/* Forward declaration for rtModel */ -typedef struct tag_RTM_socTouchDisplay_T RT_MODEL_socTouchDisplay_T; - -#endif /* RTW_HEADER_socTouchDisplay_types_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ diff --git a/ivec_APP/src/socTouchDisplay.c b/ivec_APP/src/socTouchDisplay.c deleted file mode 100644 index e437623..0000000 --- a/ivec_APP/src/socTouchDisplay.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * File: socTouchDisplay.c - * - * Code generated for Simulink model 'socTouchDisplay'. - * - * Model version : 1.140 - * Simulink Coder version : 23.2 (R2023b) 01-Aug-2023 - * C/C++ source code generated on : Mon Jan 20 13:31:03 2025 - * - * Target selection: ert.tlc - * Embedded hardware selection: Intel->x86-64 (Windows64) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#include "socTouchDisplay.h" -#include "rtwtypes.h" -#include -#include "socTouchDisplay_private.h" - -/* Named constants for Chart: '/Chart' */ -#define socTouchDis_IN_touchNotDetected ((uint8_T)4U) -#define socTouchDisp_IN_NO_ACTIVE_CHILD ((uint8_T)0U) -#define socTouchDisplay_IN_HideSoc ((uint8_T)1U) -#define socTouchDisplay_IN_chargingMode ((uint8_T)1U) -#define socTouchDisplay_IN_dispalySoc ((uint8_T)2U) -#define socTouchDisplay_IN_displayError ((uint8_T)2U) -#define socTouchDisplay_IN_displaySoc ((uint8_T)3U) - -/* Named constants for Chart: '/Chart1' */ -#define socTouchDisplay_IN_bmsPresent ((uint8_T)1U) -#define socTouchDisplay_IN_init ((uint8_T)2U) - -/* Block signals (default storage) */ -B_socTouchDisplay_T socTouchDisplay_B = {0}; - -/* Block states (default storage) */ -DW_socTouchDisplay_T socTouchDisplay_DW; - -/* External inputs (root inport signals with default storage) */ -ExtU_socTouchDisplay_T socTouchDisplay_U; - -/* External outputs (root outports fed by signals with default storage) */ -ExtY_socTouchDisplay_T socTouchDisplay_Y; - -/* Real-time model */ -static RT_MODEL_socTouchDisplay_T socTouchDisplay_M_; -RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M = &socTouchDisplay_M_; - -/* Model step function */ -void socTouchDisplay_step(void) -{ - int32_T i; - int32_T s3_iter; - uint32_T tmp; - uint8_T rtb_Cast; - boolean_T Memory_PreviousInput; - boolean_T rtb_AND; - boolean_T rtb_Equal; - boolean_T rtb_Memory; - - /* Outputs for Iterator SubSystem: '/canMsgDecode' incorporates: - * ForIterator: '/For Iterator' - */ - /* InitializeConditions for Memory: '/Memory' */ - Memory_PreviousInput = false; - for (s3_iter = 0; s3_iter < 10; s3_iter++) { - /* Selector: '/Selector' incorporates: - * Inport: '/Input' - */ - socTouchDisplay_B.Selector = socTouchDisplay_U.Input[s3_iter]; - - /* S-Function (canReceive): '/S-Function' */ - canReceive_Outputs_wrapper(&socTouchDisplay_B.Selector.ID, - &socTouchDisplay_B.Selector.Length, &socTouchDisplay_B.Selector.Data[0], - &socTouchDisplay_B.SFunction); - - /* RelationalOperator: '/Equal' incorporates: - * Inport: '/ip_u32canId' - */ - rtb_Equal = (socTouchDisplay_B.SFunction.ID == socTouchDisplay_U.ip_u32canId); - - /* Logic: '/AND' incorporates: - * Constant: '/Constant' - * RelationalOperator: '/Equal1' - */ - rtb_AND = (rtb_Equal && (socTouchDisplay_B.SFunction.Data[0] == 2)); - - /* Memory: '/Memory' */ - rtb_Memory = Memory_PreviousInput; - - /* Outputs for Enabled SubSystem: '/Enabled Subsystem' incorporates: - * EnablePort: '/Enable' - */ - if (rtb_AND) { - for (i = 0; i < 8; i++) { - /* SignalConversion generated from: '/In1' */ - socTouchDisplay_B.In1[i] = socTouchDisplay_B.SFunction.Data[i]; - } - } - - /* End of Outputs for SubSystem: '/Enabled Subsystem' */ - - /* DataTypeConversion: '/Cast' */ - rtb_Cast = socTouchDisplay_B.In1[2]; - - /* Outputs for Enabled SubSystem: '/Enabled Subsystem1' incorporates: - * EnablePort: '/Enable' - */ - /* Logic: '/AND1' incorporates: - * Constant: '/Constant1' - * RelationalOperator: '/Equal2' - */ - if (rtb_Equal && (socTouchDisplay_B.SFunction.Data[0] == 1)) { - /* RelationalOperator: '/Compare' incorporates: - * Constant: '/Constant' - */ - socTouchDisplay_B.Compare = (socTouchDisplay_B.SFunction.Data[6] == 4); - } - - /* End of Logic: '/AND1' */ - /* End of Outputs for SubSystem: '/Enabled Subsystem1' */ - - /* Update for Memory: '/Memory' incorporates: - * Logic: '/OR' - */ - Memory_PreviousInput = (rtb_AND || Memory_PreviousInput); - } - - /* End of Outputs for SubSystem: '/canMsgDecode' */ - - /* Chart: '/Chart1' */ - if (socTouchDisplay_DW.is_active_c1_socTouchDisplay == 0U) { - socTouchDisplay_DW.is_active_c1_socTouchDisplay = 1U; - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_init; - Memory_PreviousInput = false; - } else if (socTouchDisplay_DW.is_c1_socTouchDisplay == - socTouchDisplay_IN_bmsPresent) { - Memory_PreviousInput = true; - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_1 = 0U; - } - - if (socTouchDisplay_DW.durationCounter_1 > 150U) { - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_init; - Memory_PreviousInput = false; - } - } else { - /* case IN_init: */ - Memory_PreviousInput = false; - if (rtb_Memory) { - socTouchDisplay_DW.durationCounter_1 = 0U; - socTouchDisplay_DW.is_c1_socTouchDisplay = socTouchDisplay_IN_bmsPresent; - Memory_PreviousInput = true; - } - } - - if (!rtb_Memory) { - socTouchDisplay_DW.durationCounter_1++; - } else { - socTouchDisplay_DW.durationCounter_1 = 0U; - } - - /* End of Chart: '/Chart1' */ - - /* Chart: '/Chart' incorporates: - * Inport: '/in_bTouchDetected' - * Inport: '/ip_u32DisplayDuration_msec' - * Inport: '/ip_u32TouchDuration_msec' - */ - if (socTouchDisplay_DW.temporalCounter_i1 < MAX_uint32_T) { - socTouchDisplay_DW.temporalCounter_i1++; - } - - if (socTouchDisplay_DW.is_active_c3_socTouchDisplay == 0U) { - socTouchDisplay_DW.is_active_c3_socTouchDisplay = 1U; - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_l = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = socTouchDis_IN_touchNotDetected; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } else { - switch (socTouchDisplay_DW.is_c3_socTouchDisplay) { - case socTouchDisplay_IN_chargingMode: - if (socTouchDisplay_B.Compare) { - socTouchDisplay_DW.durationCounter_1_a = 0U; - } - - if ((socTouchDisplay_DW.durationCounter_1_a > 20U) || - (!Memory_PreviousInput)) { - socTouchDisplay_DW.is_chargingMode = socTouchDisp_IN_NO_ACTIVE_CHILD; - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_l = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDis_IN_touchNotDetected; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } else if (socTouchDisplay_DW.is_chargingMode == - socTouchDisplay_IN_HideSoc) { - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - if (socTouchDisplay_DW.temporalCounter_i1 >= 20U) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_chargingMode = socTouchDisplay_IN_dispalySoc; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = true; - } - } else { - /* Outport: '/op_bDisplayStatus' */ - /* case IN_dispalySoc: */ - socTouchDisplay_Y.op_bDisplayStatus = true; - if (socTouchDisplay_DW.temporalCounter_i1 >= 20U) { - socTouchDisplay_DW.temporalCounter_i1 = 0U; - socTouchDisplay_DW.is_chargingMode = socTouchDisplay_IN_HideSoc; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - } - } - break; - - case socTouchDisplay_IN_displayError: - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = true; - if ((uint32_T)((int32_T)socTouchDisplay_DW.temporalCounter_i1 * 100) >= - (uint32_T)ceil(socTouchDisplay_U.ip_u32DisplayDuration_msec)) { - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_l = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDis_IN_touchNotDetected; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } - break; - - case socTouchDisplay_IN_displaySoc: - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = true; - if ((uint32_T)((int32_T)socTouchDisplay_DW.temporalCounter_i1 * 100) >= - (uint32_T)ceil(socTouchDisplay_U.ip_u32DisplayDuration_msec)) { - socTouchDisplay_DW.durationCounter_2 = 0U; - socTouchDisplay_DW.durationCounter_1_l = 0U; - socTouchDisplay_DW.is_c3_socTouchDisplay = - socTouchDis_IN_touchNotDetected; - - /* Outport: '/op_bDisplayStatus' */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '/op_bErrorStatus' */ - socTouchDisplay_Y.op_bErrorStatus = false; - } - break; - - default: - /* Outport: '/op_bDisplayStatus' */ - /* case IN_touchNotDetected: */ - socTouchDisplay_Y.op_bDisplayStatus = false; - - /* Outport: '