Merge branch 'uart_Pin_Pa8&9' into uart_can_fucntional
commit
9999b9cfeb
13
.project
13
.project
|
|
@ -24,4 +24,17 @@
|
|||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>driverlib</name>
|
||||
<type>2</type>
|
||||
<location>C:/ti/mspm0_sdk_2_02_00_05/source/ti/driverlib</location>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>SYSCONFIG_TOOL_SYMBOLS</name>
|
||||
<value>file:/C:/ti/ccs1280/ccs/utils/sysconfig_1.21.0</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@ volatile DL_MCAN_RxBufElement TempRxMsg;
|
|||
volatile uint8_t TempRxBuffer[8];
|
||||
volatile uint32_t TempRxID;
|
||||
volatile uint32_t id;
|
||||
DL_MCAN_ProtocolStatus HeaderStat;
|
||||
volatile DL_MCAN_ProtocolStatus HeaderStat;
|
||||
volatile uint32_t l_canTransmitTimeout;
|
||||
volatile uint8_t u8CallBack_buff[8]={0};
|
||||
volatile IVEC_McalStatus_e l_statusFlag = IVEC_MCAL_STATUS_SUCCESS;
|
||||
extern volatile uint8_t u8CANDataAct;
|
||||
#define MCAN_FILTER_SIZE 0u
|
||||
/*REQUIRED MCAN CONFIGS*/
|
||||
#define MCAN_FILTER_SIZE 2u
|
||||
|
||||
|
||||
__attribute__((weak)) void mcu_FDCAN_RxFifo_Callback(uint32_t Identifier, uint8_t *data, uint16_t DataLength)
|
||||
|
|
@ -177,6 +178,7 @@ static DL_MCAN_MsgRAMConfigParams gMCAN0MsgRAMConfigParams ={
|
|||
.rxFIFO1ElemSize = DL_MCAN_ELEM_SIZE_8BYTES,
|
||||
};
|
||||
|
||||
|
||||
static DL_MCAN_BitTimingParams gMCAN0BitTimes_500 = {
|
||||
/* Arbitration Baud Rate Pre-scaler. */
|
||||
.nomRatePrescalar = 0,
|
||||
|
|
@ -219,8 +221,8 @@ static DL_MCAN_BitTimingParams gMCAN0BitTimes_250 = {
|
|||
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem1 = {
|
||||
.sfec = 001,
|
||||
.sft = 0x00,
|
||||
.sfid1 = 0x1,
|
||||
.sfid2 = 0x539,
|
||||
.sfid1 = 0,
|
||||
.sfid2 = 1280,
|
||||
};
|
||||
|
||||
//static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem1 = {
|
||||
|
|
@ -233,8 +235,8 @@ static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem1 = {
|
|||
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem2 = {
|
||||
.sfec = 0x1,
|
||||
.sft = 0x00,
|
||||
.sfid1 = 0x541,
|
||||
.sfid2 = 0x2046,
|
||||
.sfid1 = 1536,
|
||||
.sfid2 = 2046,
|
||||
};
|
||||
|
||||
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem3 = {
|
||||
|
|
@ -259,17 +261,18 @@ static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem5 = {
|
|||
};
|
||||
|
||||
static const DL_MCAN_ExtMsgIDFilterElement gMCAN0ExtFiltelem1 = {
|
||||
.efec = 001,
|
||||
.eft = 10,
|
||||
.efid1 = 0x1fffff69,
|
||||
.efid2 = 0xff,
|
||||
.efec = 0x1,
|
||||
.eft = 0x0,
|
||||
.efid1 = 2047,
|
||||
.efid2 = 536870911,
|
||||
};
|
||||
|
||||
|
||||
static const DL_MCAN_ExtMsgIDFilterElement gMCAN0ExtFiltelem2 = {
|
||||
.efec = 0x1,
|
||||
.eft = 0x0,
|
||||
.efid1 = 4000,
|
||||
.efid2 = 4500,
|
||||
.efid1 = 2047,
|
||||
.efid2 = 536870911,
|
||||
};
|
||||
|
||||
static const DL_MCAN_ExtMsgIDFilterElement gMCAN0ExtFiltelem3 = {
|
||||
|
|
@ -285,14 +288,15 @@ volatile DL_MCAN_TxBufElement txMsg = {
|
|||
.xtd = 0U,
|
||||
.esi = 0U,
|
||||
.dlc = 8U,
|
||||
.brs = 1U,
|
||||
.fdf = 1U,
|
||||
.brs = 0U,
|
||||
.fdf = 0U,
|
||||
.efc = 1U,
|
||||
.mm = 0xAAU,
|
||||
.data = 0U,
|
||||
.data = {0},
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*____________________________________________________________________________________________________________________________________________________________________________________________*/
|
||||
|
||||
|
||||
|
|
@ -315,30 +319,26 @@ static void _prv_vGetRxMsg(DL_MCAN_RxBufElement *rxMsg,uint32_t *ID,uint8_t *RxD
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Default Interrupt Handler for MCAN
|
||||
*
|
||||
*/
|
||||
void CANFD0_IRQHandler(void)
|
||||
void __prv_CANInterruptProcess(uint32_t u32InterruptStatus)
|
||||
{
|
||||
uint32_t IntrStatus = DL_MCAN_getIntrStatus(CANFD0);
|
||||
uint32_t IntrStatus = u32InterruptStatus;
|
||||
DL_MCAN_getProtocolStatus(CANFD0, &HeaderStat);
|
||||
|
||||
if (IntrStatus & DL_MCAN_INTERRUPT_TC){
|
||||
__asm("nop");
|
||||
DL_MCAN_clearIntrStatus(CANFD0, IntrStatus,DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
|
||||
b_ServiceInt = true;
|
||||
u8_MCAN_StatusFlag = IVEC_MCAL_STATUS_SUCCESS;
|
||||
__asm("nop");
|
||||
}
|
||||
else if(IntrStatus & DL_MCAN_INTERRUPT_RF0N){
|
||||
|
||||
if( IntrStatus & DL_MCAN_INTERRUPT_BO)
|
||||
DL_MCAN_setOpMode(CANFD0, DL_MCAN_OPERATION_MODE_NORMAL);
|
||||
|
||||
if(IntrStatus & (DL_MCAN_INTERRUPT_RF0N | DL_MCAN_INTERRUPT_RF1N)){
|
||||
|
||||
while (false == b_ServiceInt);
|
||||
|
||||
b_ServiceInt = false;
|
||||
rxFS.fillLvl = 0;
|
||||
rxFS.num = DL_MCAN_RX_FIFO_NUM_0;
|
||||
rxFS.num = (IntrStatus & DL_MCAN_INTERRUPT_RF0N) ? DL_MCAN_RX_FIFO_NUM_0 : DL_MCAN_RX_FIFO_NUM_1;
|
||||
|
||||
while ((rxFS.fillLvl) == 0)
|
||||
{
|
||||
|
|
@ -348,65 +348,46 @@ void CANFD0_IRQHandler(void)
|
|||
DL_MCAN_readMsgRam(CANFD0, DL_MCAN_MEM_TYPE_FIFO, 0, rxFS.num, &TempRxMsg);
|
||||
DL_MCAN_writeRxFIFOAck(CANFD0, rxFS.num, rxFS.getIdx);
|
||||
|
||||
xCanIdType_t idType = ERROR;
|
||||
// if (TempRxMsg.id >= 0 && TempRxMsg.id <= 0x7FF)
|
||||
// {
|
||||
// idType = STD_ID;
|
||||
// } else if (TempRxMsg.id <= 0x1FFFFFFF)
|
||||
// {
|
||||
// idType = EXT_ID;
|
||||
// }
|
||||
//
|
||||
// for(int i=0;i<8;i++)
|
||||
// {
|
||||
// u8CallBack_buff[i]=(TempRxMsg.data[i] & 0xFF);
|
||||
// }
|
||||
|
||||
uint64_t idx = 0;
|
||||
idx = TempRxMsg.id;
|
||||
uint32_t value = ((TempRxMsg.id & (uint32_t) 0x1FFC0000) >> (uint32_t) 18);
|
||||
if ((value > 0) && (value <= 0x7FF))
|
||||
if(TempRxMsg.xtd == 0)
|
||||
{
|
||||
idType = STD_ID;
|
||||
idx = value;
|
||||
idx = ((TempRxMsg.id & (uint32_t) 0x1FFC0000) >> (uint32_t) 18);
|
||||
}
|
||||
|
||||
|
||||
__asm("nop");
|
||||
|
||||
TempRxID = idx;
|
||||
_prv_vGetRxMsg(&TempRxMsg,&TempRxID ,TempRxBuffer,TempRxMsg.dlc);
|
||||
DL_MCAN_clearIntrStatus(CANFD0, IntrStatus,DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
b_ServiceInt = true;
|
||||
if(HeaderStat.busOffStatus==1)
|
||||
{
|
||||
DL_MCAN_setOpMode(CANFD0, DL_MCAN_OPERATION_MODE_NORMAL);
|
||||
}
|
||||
if( !TempRxMsg.xtd )
|
||||
TempRxMsg.id = (uint32_t)(TempRxMsg.id >> 18);
|
||||
uint8_t l_pu8DataArr[8] = {0};
|
||||
for( int ijk = 0; ijk < 8; ijk++ )
|
||||
l_pu8DataArr[ijk] = TempRxMsg.data[ijk] & 0xFF;
|
||||
|
||||
uint32_t u32RxCANID = 0;
|
||||
uint8_t u8RxData[8] = {0};
|
||||
|
||||
xMCAL_MCANRx(CANFD0,&u32RxCANID,u8RxData,8);
|
||||
|
||||
// vSOC_MeterCallback(u32RxCANID, &u8RxData[0]);
|
||||
mcu_FDCAN_RxFifo_Callback(u32RxCANID, &u8RxData[0], TempRxMsg.dlc);
|
||||
mcu_FDCAN_RxFifo_Callback(TempRxMsg.id, &l_pu8DataArr[0], TempRxMsg.dlc);
|
||||
}
|
||||
else if(IntrStatus & MCAN_IR_PEA_MASK)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Default Interrupt Handler for MCAN
|
||||
*
|
||||
*/
|
||||
void CANFD0_IRQHandler(void)
|
||||
{
|
||||
switch (DL_MCAN_getPendingInterrupt(CANFD0)) {
|
||||
case DL_MCAN_IIDX_LINE1:
|
||||
{
|
||||
__asm("nop");
|
||||
DL_MCAN_clearIntrStatus(CANFD0, IntrStatus,DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
|
||||
uint32_t IntrStatus = DL_MCAN_getIntrStatus(CANFD0);
|
||||
__prv_CANInterruptProcess(IntrStatus);
|
||||
DL_MCAN_clearIntrStatus(MCAN0_INST, IntrStatus,
|
||||
DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
}
|
||||
else if(IntrStatus & MCAN_IR_BO_MASK)
|
||||
|
||||
break;
|
||||
case DL_MCAN_IIDX_LINE0:
|
||||
{
|
||||
DL_MCAN_clearIntrStatus(CANFD0, IntrStatus,DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
uint32_t IntrStatus = DL_MCAN_getIntrStatus(CANFD0);
|
||||
__prv_CANInterruptProcess(IntrStatus);
|
||||
DL_MCAN_clearIntrStatus(MCAN0_INST, IntrStatus,
|
||||
DL_MCAN_INTR_SRC_MCAN_LINE_0);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
DL_MCAN_clearIntrStatus(CANFD0, IntrStatus,DL_MCAN_INTR_SRC_MCAN_LINE_1);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -505,6 +486,7 @@ IVEC_McalStatus_e xMCAL_MCANInit(MCAN_Regs* MCAN, xCAN_baud_t BAUD)
|
|||
DL_MCAN_INTERRUPT_PEA | \
|
||||
DL_MCAN_INTERRUPT_PED | \
|
||||
DL_MCAN_INTERRUPT_RF0N | \
|
||||
DL_MCAN_INTERRUPT_RF1N | \
|
||||
DL_MCAN_INTERRUPT_TC | \
|
||||
DL_MCAN_INTERRUPT_TOO), 1U);
|
||||
|
||||
|
|
@ -516,11 +498,28 @@ IVEC_McalStatus_e xMCAL_MCANInit(MCAN_Regs* MCAN, xCAN_baud_t BAUD)
|
|||
DL_MCAN_INTERRUPT_PEA | \
|
||||
DL_MCAN_INTERRUPT_PED | \
|
||||
DL_MCAN_INTERRUPT_RF0N | \
|
||||
DL_MCAN_INTERRUPT_RF1N | \
|
||||
DL_MCAN_INTERRUPT_TC | \
|
||||
DL_MCAN_INTERRUPT_TOO), DL_MCAN_INTR_LINE_NUM_1);
|
||||
DL_MCAN_enableIntrLine(MCAN, DL_MCAN_INTR_LINE_NUM_1, 1U);
|
||||
|
||||
DL_MCAN_selectIntrLine(MCAN, (DL_MCAN_INTERRUPT_BEU | \
|
||||
DL_MCAN_INTERRUPT_BO | \
|
||||
DL_MCAN_INTERRUPT_ELO | \
|
||||
DL_MCAN_INTERRUPT_EP | \
|
||||
DL_MCAN_INTERRUPT_EW | \
|
||||
DL_MCAN_INTERRUPT_PEA | \
|
||||
DL_MCAN_INTERRUPT_PED | \
|
||||
DL_MCAN_INTERRUPT_RF0N | \
|
||||
DL_MCAN_INTERRUPT_RF1N | \
|
||||
DL_MCAN_INTERRUPT_TC | \
|
||||
DL_MCAN_INTERRUPT_TOO), DL_MCAN_INTR_LINE_NUM_0);
|
||||
DL_MCAN_enableIntrLine(MCAN, DL_MCAN_INTR_LINE_NUM_0, 1U);
|
||||
|
||||
/* Enable MSPM0 MCAN interrupt */
|
||||
DL_MCAN_clearInterruptStatus(MCAN,(DL_MCAN_MSP_INTERRUPT_LINE0));
|
||||
DL_MCAN_enableInterrupt(MCAN,(DL_MCAN_MSP_INTERRUPT_LINE0));
|
||||
|
||||
DL_MCAN_clearInterruptStatus(MCAN,(DL_MCAN_MSP_INTERRUPT_LINE1));
|
||||
DL_MCAN_enableInterrupt(MCAN,(DL_MCAN_MSP_INTERRUPT_LINE1));
|
||||
NVIC_SetPriority(CANFD0_INT_IRQn, 1);
|
||||
|
|
@ -602,9 +601,7 @@ IVEC_McalStatus_e xMCAL_MCANTx(MCAN_Regs *MCAN, uint32_t u32ID ,uint16_t *TxData
|
|||
{
|
||||
txMsg.data[i]=TxData[i];
|
||||
}
|
||||
|
||||
// memcpy(txMsg.data,TxData,Bytes);
|
||||
__asm("nop");
|
||||
txMsg.dlc = Bytes;
|
||||
|
||||
DL_MCAN_writeMsgRam(MCAN, DL_MCAN_MEM_TYPE_BUF, BufNum , &txMsg);
|
||||
|
||||
|
|
@ -618,11 +615,9 @@ IVEC_McalStatus_e xMCAL_MCANTx(MCAN_Regs *MCAN, uint32_t u32ID ,uint16_t *TxData
|
|||
while(1){
|
||||
|
||||
if (u8_MCAN_StatusFlag == IVEC_MCAL_STATUS_SUCCESS || u8_MCAN_StatusFlag == IVEC_MCAL_STATUS_ERROR){
|
||||
__asm("nop");
|
||||
return u8_MCAN_StatusFlag;
|
||||
}
|
||||
else if((i32MCAL_getTicks() - l_canTransmitTimeout) > 2){
|
||||
__asm("nop");
|
||||
return IVEC_MCAL_STATUS_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
|
@ -655,18 +650,12 @@ IVEC_McalStatus_e xMCAL_MCANRx(MCAN_Regs *MCAN,uint32_t *ID ,uint8_t *RxData, in
|
|||
DL_MCAN_setOpMode(CANFD0, DL_MCAN_OPERATION_MODE_NORMAL);
|
||||
}
|
||||
|
||||
if((((TempRxID&0xFFF)>>1)==0x16))
|
||||
{
|
||||
xMCAL_SoftReset();
|
||||
}
|
||||
if((((TempRxID&0xFFF)>>1)==0x1AE)||(((TempRxID&0xFFF)>>1)==0x520)||(((TempRxID&0xFFF)>>1)==0xBB)||(((TempRxID&0xFFF)>>1)==0x1A4)||(((TempRxID&0xFFF)>>1)==0x521))//TODO: CHANGE ID CHECKS AFTER UPDATED CAN MATRIX
|
||||
{
|
||||
*ID=((TempRxID&0xFFF)>>1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if((((TempRxID&0xFFF)>>1)==0x16))
|
||||
// {
|
||||
// xMCAL_SoftReset();
|
||||
// }
|
||||
|
||||
*ID=TempRxID;
|
||||
}
|
||||
|
||||
for(int i=0;i<DLC;i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ void _prv_vrxcallback(UART_Regs *pxUartInstance, uint32_t event)
|
|||
{
|
||||
case DL_UART_MAIN_IIDX_RX:
|
||||
{
|
||||
bool status = 0;
|
||||
uint8_t l_pu8Buffer[8] = {0}; // Adjust size as needed
|
||||
uint8_t l_pu8Buffer[64] = {0}; // Adjust size as needed
|
||||
uint32_t bytesRead;
|
||||
|
||||
// Drain the RX FIFO and store the data in buffer
|
||||
|
|
@ -253,21 +252,11 @@ exit:
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
static xCoreStatus_t uart_transmit(McalUartHandle_s* pxUartHandle, uint8_t *u8txdata, uint32_t u32size)
|
||||
{
|
||||
// assert(b_UART1_init_flag == 1 || b_UART3_init_flag == 1);
|
||||
// assert(uart_inst == UART1 || uart_inst == UART3);
|
||||
|
||||
|
||||
// Get the UART instance based on the port number in the handle
|
||||
UART_Regs* uart_inst = GetUartInstance(pxUartHandle->eUartPortNumber);
|
||||
|
||||
// Check if the UART instance is valid
|
||||
if (uart_inst == NULL)
|
||||
{
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
|
||||
// Check if data length is valid
|
||||
if(u32size==0)
|
||||
if (uart_inst == NULL || u32size==0)
|
||||
{
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
|
|
@ -276,7 +265,7 @@ static xCoreStatus_t uart_transmit(McalUartHandle_s* pxUartHandle, uint8_t *u8tx
|
|||
for(int j=0; j<u32size; j++)
|
||||
{
|
||||
DL_UART_transmitData(uart_inst,u8txdata[j]);
|
||||
while(DL_UART_Main_isBusy(uart_inst) && ((i32MCAL_getTicks() - l_u32Tick) < 10));
|
||||
while(DL_UART_isTXFIFOFull(uart_inst) && ((i32MCAL_getTicks() - l_u32Tick) < 100));
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,480 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of Texas Instruments Incorporated nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ============ ti_msp_dl_config.c =============
|
||||
* Configured MSPM0 DriverLib module definitions
|
||||
*
|
||||
* DO NOT EDIT - This file is generated for the MSPM0G350X
|
||||
* by the SysConfig tool.
|
||||
*/
|
||||
|
||||
#include "ti_msp_dl_config.h"
|
||||
|
||||
DL_TimerA_backupConfig gCAPTURE_0Backup;
|
||||
DL_TimerA_backupConfig gTIMER_1Backup;
|
||||
DL_MCAN_backupConfig gMCAN0Backup;
|
||||
|
||||
/*
|
||||
* ======== SYSCFG_DL_init ========
|
||||
* Perform any initialization needed before using any board APIs
|
||||
*/
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_init(void)
|
||||
{
|
||||
SYSCFG_DL_initPower();
|
||||
SYSCFG_DL_GPIO_init();
|
||||
/* Module-Specific Initializations*/
|
||||
SYSCFG_DL_SYSCTL_init();
|
||||
SYSCFG_DL_CAPTURE_0_init();
|
||||
SYSCFG_DL_TIMER_0_init();
|
||||
SYSCFG_DL_TIMER_1_init();
|
||||
SYSCFG_DL_UART_0_init();
|
||||
SYSCFG_DL_MCAN0_init();
|
||||
SYSCFG_DL_SYSCTL_CLK_init();
|
||||
/* Ensure backup structures have no valid state */
|
||||
gCAPTURE_0Backup.backupRdy = false;
|
||||
gTIMER_1Backup.backupRdy = false;
|
||||
|
||||
gMCAN0Backup.backupRdy = false;
|
||||
|
||||
}
|
||||
/*
|
||||
* User should take care to save and restore register configuration in application.
|
||||
* See Retention Configuration section for more details.
|
||||
*/
|
||||
SYSCONFIG_WEAK bool SYSCFG_DL_saveConfiguration(void)
|
||||
{
|
||||
bool retStatus = true;
|
||||
|
||||
retStatus &= DL_TimerA_saveConfiguration(CAPTURE_0_INST, &gCAPTURE_0Backup);
|
||||
retStatus &= DL_TimerA_saveConfiguration(TIMER_1_INST, &gTIMER_1Backup);
|
||||
retStatus &= DL_MCAN_saveConfiguration(MCAN0_INST, &gMCAN0Backup);
|
||||
|
||||
return retStatus;
|
||||
}
|
||||
|
||||
|
||||
SYSCONFIG_WEAK bool SYSCFG_DL_restoreConfiguration(void)
|
||||
{
|
||||
bool retStatus = true;
|
||||
|
||||
retStatus &= DL_TimerA_restoreConfiguration(CAPTURE_0_INST, &gCAPTURE_0Backup, false);
|
||||
retStatus &= DL_TimerA_restoreConfiguration(TIMER_1_INST, &gTIMER_1Backup, false);
|
||||
retStatus &= DL_MCAN_restoreConfiguration(MCAN0_INST, &gMCAN0Backup);
|
||||
|
||||
return retStatus;
|
||||
}
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_initPower(void)
|
||||
{
|
||||
DL_GPIO_reset(GPIOA);
|
||||
DL_GPIO_reset(GPIOB);
|
||||
DL_TimerA_reset(CAPTURE_0_INST);
|
||||
DL_TimerG_reset(TIMER_0_INST);
|
||||
DL_TimerA_reset(TIMER_1_INST);
|
||||
DL_UART_Main_reset(UART_0_INST);
|
||||
DL_MCAN_reset(MCAN0_INST);
|
||||
|
||||
DL_GPIO_enablePower(GPIOA);
|
||||
DL_GPIO_enablePower(GPIOB);
|
||||
DL_TimerA_enablePower(CAPTURE_0_INST);
|
||||
DL_TimerG_enablePower(TIMER_0_INST);
|
||||
DL_TimerA_enablePower(TIMER_1_INST);
|
||||
DL_UART_Main_enablePower(UART_0_INST);
|
||||
DL_MCAN_enablePower(MCAN0_INST);
|
||||
delay_cycles(POWER_STARTUP_DELAY);
|
||||
}
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void)
|
||||
{
|
||||
|
||||
DL_GPIO_initPeripheralAnalogFunction(GPIO_HFXIN_IOMUX);
|
||||
DL_GPIO_initPeripheralAnalogFunction(GPIO_HFXOUT_IOMUX);
|
||||
|
||||
DL_GPIO_initPeripheralInputFunction(GPIO_CAPTURE_0_C0_IOMUX,GPIO_CAPTURE_0_C0_IOMUX_FUNC);
|
||||
|
||||
DL_GPIO_initPeripheralOutputFunction(
|
||||
GPIO_UART_0_IOMUX_TX, GPIO_UART_0_IOMUX_TX_FUNC);
|
||||
DL_GPIO_initPeripheralInputFunction(
|
||||
GPIO_UART_0_IOMUX_RX, GPIO_UART_0_IOMUX_RX_FUNC);
|
||||
|
||||
DL_GPIO_initDigitalInputFeatures(GPIO_GRP_0_PIN_0_IOMUX,
|
||||
DL_GPIO_INVERSION_DISABLE, DL_GPIO_RESISTOR_NONE,
|
||||
DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);
|
||||
// DL_GPIO_initDigitalOutput(GPIO_GRP_0_PIN_0_IOMUX);
|
||||
|
||||
DL_GPIO_initPeripheralOutputFunction(
|
||||
GPIO_MCAN0_IOMUX_CAN_TX, GPIO_MCAN0_IOMUX_CAN_TX_FUNC);
|
||||
DL_GPIO_initPeripheralInputFunction(
|
||||
GPIO_MCAN0_IOMUX_CAN_RX, GPIO_MCAN0_IOMUX_CAN_RX_FUNC);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static const DL_SYSCTL_SYSPLLConfig gSYSPLLConfig = {
|
||||
.inputFreq = DL_SYSCTL_SYSPLL_INPUT_FREQ_16_32_MHZ,
|
||||
.rDivClk2x = 1,
|
||||
.rDivClk1 = 0,
|
||||
.rDivClk0 = 0,
|
||||
.enableCLK2x = DL_SYSCTL_SYSPLL_CLK2X_DISABLE,
|
||||
.enableCLK1 = DL_SYSCTL_SYSPLL_CLK1_DISABLE,
|
||||
.enableCLK0 = DL_SYSCTL_SYSPLL_CLK0_ENABLE,
|
||||
.sysPLLMCLK = DL_SYSCTL_SYSPLL_MCLK_CLK0,
|
||||
.sysPLLRef = DL_SYSCTL_SYSPLL_REF_HFCLK,
|
||||
.qDiv = 1,
|
||||
.pDiv = DL_SYSCTL_SYSPLL_PDIV_1
|
||||
};
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void)
|
||||
{
|
||||
|
||||
//Low Power Mode is configured to be SLEEP0
|
||||
DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0);
|
||||
DL_SYSCTL_setFlashWaitState(DL_SYSCTL_FLASH_WAIT_STATE_2);
|
||||
|
||||
|
||||
DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE);
|
||||
/* Set default configuration */
|
||||
DL_SYSCTL_disableHFXT();
|
||||
DL_SYSCTL_disableSYSPLL();
|
||||
DL_SYSCTL_setHFCLKSourceHFXTParams(DL_SYSCTL_HFXT_RANGE_16_32_MHZ,10, true);
|
||||
DL_SYSCTL_configSYSPLL((DL_SYSCTL_SYSPLLConfig *) &gSYSPLLConfig);
|
||||
DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1);
|
||||
DL_SYSCTL_setMCLKSource(SYSOSC, HSCLK, DL_SYSCTL_HSCLK_SOURCE_SYSPLL);
|
||||
|
||||
}
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_CLK_init(void) {
|
||||
while ((DL_SYSCTL_getClockStatus() & (DL_SYSCTL_CLK_STATUS_SYSPLL_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_HFCLK_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_HSCLK_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_LFOSC_GOOD))
|
||||
!= (DL_SYSCTL_CLK_STATUS_SYSPLL_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_HFCLK_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_HSCLK_GOOD
|
||||
| DL_SYSCTL_CLK_STATUS_LFOSC_GOOD))
|
||||
{
|
||||
/* Ensure that clocks are in default POR configuration before initialization.
|
||||
* Additionally once LFXT is enabled, the internal LFOSC is disabled, and cannot
|
||||
* be re-enabled other than by executing a BOOTRST. */
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Timer clock configuration to be sourced by BUSCLK / (24000000 Hz)
|
||||
* timerClkFreq = (timerClkSrc / (timerClkDivRatio * (timerClkPrescale + 1)))
|
||||
* 12000000 Hz = 24000000 Hz / (1 * (1 + 1))
|
||||
*/
|
||||
static const DL_TimerA_ClockConfig gCAPTURE_0ClockConfig = {
|
||||
.clockSel = DL_TIMER_CLOCK_BUSCLK,
|
||||
.divideRatio = DL_TIMER_CLOCK_DIVIDE_1,
|
||||
.prescale = 1U
|
||||
};
|
||||
|
||||
/*
|
||||
* Timer load value (where the counter starts from) is calculated as (timerPeriod * timerClockFreq) - 1
|
||||
* CAPTURE_0_INST_LOAD_VALUE = (0 ms * 12000000 Hz) - 1
|
||||
*/
|
||||
static const DL_TimerA_CaptureConfig gCAPTURE_0CaptureConfig = {
|
||||
.captureMode = DL_TIMER_CAPTURE_MODE_EDGE_TIME,
|
||||
.period = CAPTURE_0_INST_LOAD_VALUE,
|
||||
.startTimer = DL_TIMER_STOP,
|
||||
.edgeCaptMode = DL_TIMER_CAPTURE_EDGE_DETECTION_MODE_RISING,
|
||||
.inputChan = DL_TIMER_INPUT_CHAN_0,
|
||||
.inputInvMode = DL_TIMER_CC_INPUT_INV_NOINVERT,
|
||||
};
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_CAPTURE_0_init(void) {
|
||||
|
||||
DL_TimerA_setClockConfig(CAPTURE_0_INST,
|
||||
(DL_TimerA_ClockConfig *) &gCAPTURE_0ClockConfig);
|
||||
|
||||
DL_TimerA_initCaptureMode(CAPTURE_0_INST,
|
||||
(DL_TimerA_CaptureConfig *) &gCAPTURE_0CaptureConfig);
|
||||
DL_TimerA_enableClock(CAPTURE_0_INST);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Timer clock configuration to be sourced by LFCLK / (32768 Hz)
|
||||
* timerClkFreq = (timerClkSrc / (timerClkDivRatio * (timerClkPrescale + 1)))
|
||||
* 992.969696969697 Hz = 32768 Hz / (1 * (32 + 1))
|
||||
*/
|
||||
static const DL_TimerG_ClockConfig gTIMER_0ClockConfig = {
|
||||
.clockSel = DL_TIMER_CLOCK_LFCLK,
|
||||
.divideRatio = DL_TIMER_CLOCK_DIVIDE_1,
|
||||
.prescale = 32U,
|
||||
};
|
||||
|
||||
/*
|
||||
* Timer load value (where the counter starts from) is calculated as (timerPeriod * timerClockFreq) - 1
|
||||
* TIMER_0_INST_LOAD_VALUE = (500 ms * 992.969696969697 Hz) - 1
|
||||
*/
|
||||
static const DL_TimerG_TimerConfig gTIMER_0TimerConfig = {
|
||||
.period = TIMER_0_INST_LOAD_VALUE,
|
||||
.timerMode = DL_TIMER_TIMER_MODE_PERIODIC,
|
||||
.startTimer = DL_TIMER_STOP,
|
||||
};
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_TIMER_0_init(void) {
|
||||
|
||||
DL_TimerG_setClockConfig(TIMER_0_INST,
|
||||
(DL_TimerG_ClockConfig *) &gTIMER_0ClockConfig);
|
||||
|
||||
DL_TimerG_initTimerMode(TIMER_0_INST,
|
||||
(DL_TimerG_TimerConfig *) &gTIMER_0TimerConfig);
|
||||
DL_TimerG_enableInterrupt(TIMER_0_INST , DL_TIMERG_INTERRUPT_ZERO_EVENT);
|
||||
DL_TimerG_enableClock(TIMER_0_INST);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Timer clock configuration to be sourced by LFCLK / (10922.666666666666 Hz)
|
||||
* timerClkFreq = (timerClkSrc / (timerClkDivRatio * (timerClkPrescale + 1)))
|
||||
* 10922.666666666666 Hz = 10922.666666666666 Hz / (3 * (0 + 1))
|
||||
*/
|
||||
static const DL_TimerA_ClockConfig gTIMER_1ClockConfig = {
|
||||
.clockSel = DL_TIMER_CLOCK_LFCLK,
|
||||
.divideRatio = DL_TIMER_CLOCK_DIVIDE_3,
|
||||
.prescale = 0U,
|
||||
};
|
||||
|
||||
/*
|
||||
* Timer load value (where the counter starts from) is calculated as (timerPeriod * timerClockFreq) - 1
|
||||
* TIMER_1_INST_LOAD_VALUE = (100 ms * 10922.666666666666 Hz) - 1
|
||||
*/
|
||||
static const DL_TimerA_TimerConfig gTIMER_1TimerConfig = {
|
||||
.period = TIMER_1_INST_LOAD_VALUE,
|
||||
.timerMode = DL_TIMER_TIMER_MODE_PERIODIC,
|
||||
.startTimer = DL_TIMER_STOP,
|
||||
};
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_TIMER_1_init(void) {
|
||||
|
||||
DL_TimerA_setClockConfig(TIMER_1_INST,
|
||||
(DL_TimerA_ClockConfig *) &gTIMER_1ClockConfig);
|
||||
|
||||
DL_TimerA_initTimerMode(TIMER_1_INST,
|
||||
(DL_TimerA_TimerConfig *) &gTIMER_1TimerConfig);
|
||||
DL_TimerA_enableInterrupt(TIMER_1_INST , DL_TIMERA_INTERRUPT_ZERO_EVENT);
|
||||
NVIC_SetPriority(TIMER_1_INST_INT_IRQN, 1);
|
||||
DL_TimerA_enableClock(TIMER_1_INST);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const DL_UART_Main_ClockConfig gUART_0ClockConfig = {
|
||||
.clockSel = DL_UART_MAIN_CLOCK_BUSCLK,
|
||||
.divideRatio = DL_UART_MAIN_CLOCK_DIVIDE_RATIO_1
|
||||
};
|
||||
|
||||
static const DL_UART_Main_Config gUART_0Config = {
|
||||
.mode = DL_UART_MAIN_MODE_NORMAL,
|
||||
.direction = DL_UART_MAIN_DIRECTION_TX_RX,
|
||||
.flowControl = DL_UART_MAIN_FLOW_CONTROL_NONE,
|
||||
.parity = DL_UART_MAIN_PARITY_NONE,
|
||||
.wordLength = DL_UART_MAIN_WORD_LENGTH_8_BITS,
|
||||
.stopBits = DL_UART_MAIN_STOP_BITS_ONE
|
||||
};
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_UART_0_init(void)
|
||||
{
|
||||
DL_UART_Main_setClockConfig(UART_0_INST, (DL_UART_Main_ClockConfig *) &gUART_0ClockConfig);
|
||||
|
||||
DL_UART_Main_init(UART_0_INST, (DL_UART_Main_Config *) &gUART_0Config);
|
||||
/*
|
||||
* Configure baud rate by setting oversampling and baud rate divisors.
|
||||
* Target baud rate: 115200
|
||||
* Actual baud rate: 115246.1
|
||||
*/
|
||||
DL_UART_Main_setOversampling(UART_0_INST, DL_UART_OVERSAMPLING_RATE_16X);
|
||||
DL_UART_Main_setBaudRateDivisor(UART_0_INST, UART_0_IBRD_24_MHZ_115200_BAUD, UART_0_FBRD_24_MHZ_115200_BAUD);
|
||||
|
||||
|
||||
|
||||
DL_UART_Main_enable(UART_0_INST);
|
||||
}
|
||||
|
||||
static const DL_MCAN_ClockConfig gMCAN0ClockConf = {
|
||||
.clockSel = DL_MCAN_FCLK_HFCLK,
|
||||
.divider = DL_MCAN_FCLK_DIV_1,
|
||||
};
|
||||
|
||||
static const DL_MCAN_InitParams gMCAN0InitParams= {
|
||||
|
||||
/* Initialize MCAN Init parameters. */
|
||||
.fdMode = false,
|
||||
.brsEnable = false,
|
||||
.txpEnable = false,
|
||||
.efbi = false,
|
||||
.pxhddisable = false,
|
||||
.darEnable = false,
|
||||
.wkupReqEnable = false,
|
||||
.autoWkupEnable = false,
|
||||
.emulationEnable = false,
|
||||
.tdcEnable = false,
|
||||
.wdcPreload = 255,
|
||||
|
||||
/* Transmitter Delay Compensation parameters. */
|
||||
.tdcConfig.tdcf = 10,
|
||||
.tdcConfig.tdco = 6,
|
||||
};
|
||||
|
||||
|
||||
static const DL_MCAN_MsgRAMConfigParams gMCAN0MsgRAMConfigParams ={
|
||||
|
||||
/* Standard ID Filter List Start Address. */
|
||||
.flssa = MCAN0_INST_MCAN_STD_ID_FILT_START_ADDR,
|
||||
/* List Size: Standard ID. */
|
||||
.lss = MCAN0_INST_MCAN_STD_ID_FILTER_NUM,
|
||||
/* Extended ID Filter List Start Address. */
|
||||
.flesa = MCAN0_INST_MCAN_EXT_ID_FILT_START_ADDR,
|
||||
/* List Size: Extended ID. */
|
||||
.lse = MCAN0_INST_MCAN_EXT_ID_FILTER_NUM,
|
||||
/* Tx Buffers Start Address. */
|
||||
.txStartAddr = MCAN0_INST_MCAN_TX_BUFF_START_ADDR,
|
||||
/* Number of Dedicated Transmit Buffers. */
|
||||
.txBufNum = MCAN0_INST_MCAN_TX_BUFF_SIZE,
|
||||
.txFIFOSize = 0,
|
||||
/* Tx Buffer Element Size. */
|
||||
.txBufMode = 0,
|
||||
.txBufElemSize = DL_MCAN_ELEM_SIZE_64BYTES,
|
||||
/* Tx Event FIFO Start Address. */
|
||||
.txEventFIFOStartAddr = MCAN0_INST_MCAN_TX_EVENT_START_ADDR,
|
||||
/* Event FIFO Size. */
|
||||
.txEventFIFOSize = MCAN0_INST_MCAN_TX_EVENT_SIZE,
|
||||
/* Level for Tx Event FIFO watermark interrupt. */
|
||||
.txEventFIFOWaterMark = 3,
|
||||
/* Rx FIFO0 Start Address. */
|
||||
.rxFIFO0startAddr = MCAN0_INST_MCAN_FIFO_0_START_ADDR,
|
||||
/* Number of Rx FIFO elements. */
|
||||
.rxFIFO0size = MCAN0_INST_MCAN_FIFO_0_NUM,
|
||||
/* Rx FIFO0 Watermark. */
|
||||
.rxFIFO0waterMark = 3,
|
||||
.rxFIFO0OpMode = 0,
|
||||
/* Rx FIFO1 Start Address. */
|
||||
.rxFIFO1startAddr = MCAN0_INST_MCAN_FIFO_1_START_ADDR,
|
||||
/* Number of Rx FIFO elements. */
|
||||
.rxFIFO1size = MCAN0_INST_MCAN_FIFO_1_NUM,
|
||||
/* Level for Rx FIFO 1 watermark interrupt. */
|
||||
.rxFIFO1waterMark = 3,
|
||||
/* FIFO blocking mode. */
|
||||
.rxFIFO1OpMode = 0,
|
||||
/* Rx Buffer Start Address. */
|
||||
.rxBufStartAddr = MCAN0_INST_MCAN_RX_BUFF_START_ADDR,
|
||||
/* Rx Buffer Element Size. */
|
||||
.rxBufElemSize = DL_MCAN_ELEM_SIZE_64BYTES,
|
||||
/* Rx FIFO0 Element Size. */
|
||||
.rxFIFO0ElemSize = DL_MCAN_ELEM_SIZE_64BYTES,
|
||||
/* Rx FIFO1 Element Size. */
|
||||
.rxFIFO1ElemSize = DL_MCAN_ELEM_SIZE_64BYTES,
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const DL_MCAN_BitTimingParams gMCAN0BitTimes = {
|
||||
/* Arbitration Baud Rate Pre-scaler. */
|
||||
.nomRatePrescalar = 0,
|
||||
/* Arbitration Time segment before sample point. */
|
||||
.nomTimeSeg1 = 40,
|
||||
/* Arbitration Time segment after sample point. */
|
||||
.nomTimeSeg2 = 5,
|
||||
/* Arbitration (Re)Synchronization Jump Width Range. */
|
||||
.nomSynchJumpWidth = 5,
|
||||
/* Data Baud Rate Pre-scaler. */
|
||||
.dataRatePrescalar = 0,
|
||||
/* Data Time segment before sample point. */
|
||||
.dataTimeSeg1 = 0,
|
||||
/* Data Time segment after sample point. */
|
||||
.dataTimeSeg2 = 0,
|
||||
/* Data (Re)Synchronization Jump Width. */
|
||||
.dataSynchJumpWidth = 0,
|
||||
};
|
||||
|
||||
|
||||
SYSCONFIG_WEAK void SYSCFG_DL_MCAN0_init(void) {
|
||||
DL_MCAN_RevisionId revid_MCAN0;
|
||||
|
||||
DL_MCAN_enableModuleClock(MCAN0_INST);
|
||||
|
||||
DL_MCAN_setClockConfig(MCAN0_INST, (DL_MCAN_ClockConfig *) &gMCAN0ClockConf);
|
||||
|
||||
/* Get MCANSS Revision ID. */
|
||||
DL_MCAN_getRevisionId(MCAN0_INST, &revid_MCAN0);
|
||||
|
||||
/* Wait for Memory initialization to be completed. */
|
||||
while(false == DL_MCAN_isMemInitDone(MCAN0_INST));
|
||||
|
||||
/* Put MCAN in SW initialization mode. */
|
||||
|
||||
DL_MCAN_setOpMode(MCAN0_INST, DL_MCAN_OPERATION_MODE_SW_INIT);
|
||||
|
||||
/* Wait till MCAN is not initialized. */
|
||||
while (DL_MCAN_OPERATION_MODE_SW_INIT != DL_MCAN_getOpMode(MCAN0_INST));
|
||||
|
||||
/* Initialize MCAN module. */
|
||||
DL_MCAN_init(MCAN0_INST, (DL_MCAN_InitParams *) &gMCAN0InitParams);
|
||||
|
||||
|
||||
/* Configure Bit timings. */
|
||||
DL_MCAN_setBitTime(MCAN0_INST, (DL_MCAN_BitTimingParams*) &gMCAN0BitTimes);
|
||||
|
||||
/* Configure Message RAM Sections */
|
||||
DL_MCAN_msgRAMConfig(MCAN0_INST, (DL_MCAN_MsgRAMConfigParams*) &gMCAN0MsgRAMConfigParams);
|
||||
|
||||
|
||||
|
||||
/* Set Extended ID Mask. */
|
||||
DL_MCAN_setExtIDAndMask(MCAN0_INST, MCAN0_INST_MCAN_EXT_ID_AND_MASK );
|
||||
|
||||
/* Loopback mode */
|
||||
|
||||
/* Take MCAN out of the SW initialization mode */
|
||||
DL_MCAN_setOpMode(MCAN0_INST, DL_MCAN_OPERATION_MODE_NORMAL);
|
||||
|
||||
while (DL_MCAN_OPERATION_MODE_NORMAL != DL_MCAN_getOpMode(MCAN0_INST));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Texas Instruments Incorporated - http://www.ti.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of Texas Instruments Incorporated nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ============ ti_msp_dl_config.h =============
|
||||
* Configured MSPM0 DriverLib module declarations
|
||||
*
|
||||
* DO NOT EDIT - This file is generated for the MSPM0G350X
|
||||
* by the SysConfig tool.
|
||||
*/
|
||||
#ifndef ti_msp_dl_config_h
|
||||
#define ti_msp_dl_config_h
|
||||
|
||||
#define CONFIG_MSPM0G350X
|
||||
#define CONFIG_MSPM0G3507
|
||||
|
||||
#if defined(__ti_version__) || defined(__TI_COMPILER_VERSION__)
|
||||
#define SYSCONFIG_WEAK __attribute__((weak))
|
||||
#elif defined(__IAR_SYSTEMS_ICC__)
|
||||
#define SYSCONFIG_WEAK __weak
|
||||
#elif defined(__GNUC__)
|
||||
#define SYSCONFIG_WEAK __attribute__((weak))
|
||||
#endif
|
||||
|
||||
#include <ti/devices/msp/msp.h>
|
||||
#include <ti/driverlib/driverlib.h>
|
||||
#include <ti/driverlib/m0p/dl_core.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ======== SYSCFG_DL_init ========
|
||||
* Perform all required MSP DL initialization
|
||||
*
|
||||
* This function should be called once at a point before any use of
|
||||
* MSP DL.
|
||||
*/
|
||||
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#define POWER_STARTUP_DELAY (16)
|
||||
|
||||
|
||||
#define GPIO_HFXT_PORT GPIOA
|
||||
#define GPIO_HFXIN_PIN DL_GPIO_PIN_5
|
||||
#define GPIO_HFXIN_IOMUX (IOMUX_PINCM10)
|
||||
#define GPIO_HFXOUT_PIN DL_GPIO_PIN_6
|
||||
#define GPIO_HFXOUT_IOMUX (IOMUX_PINCM11)
|
||||
#define CPUCLK_FREQ 24000000
|
||||
|
||||
|
||||
|
||||
/* Defines for CAPTURE_0 */
|
||||
#define CAPTURE_0_INST (TIMA1)
|
||||
#define CAPTURE_0_INST_IRQHandler TIMA1_IRQHandler
|
||||
#define CAPTURE_0_INST_INT_IRQN (TIMA1_INT_IRQn)
|
||||
#define CAPTURE_0_INST_LOAD_VALUE (0U)
|
||||
/* GPIO defines for channel 0 */
|
||||
#define GPIO_CAPTURE_0_C0_PORT GPIOA
|
||||
#define GPIO_CAPTURE_0_C0_PIN DL_GPIO_PIN_10
|
||||
#define GPIO_CAPTURE_0_C0_IOMUX (IOMUX_PINCM21)
|
||||
#define GPIO_CAPTURE_0_C0_IOMUX_FUNC IOMUX_PINCM21_PF_TIMA1_CCP0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Defines for TIMER_0 */
|
||||
#define TIMER_0_INST (TIMG0)
|
||||
#define TIMER_0_INST_IRQHandler TIMG0_IRQHandler
|
||||
#define TIMER_0_INST_INT_IRQN (TIMG0_INT_IRQn)
|
||||
#define TIMER_0_INST_LOAD_VALUE (495U)
|
||||
/* Defines for TIMER_1 */
|
||||
#define TIMER_1_INST (TIMA0)
|
||||
#define TIMER_1_INST_IRQHandler TIMA0_IRQHandler
|
||||
#define TIMER_1_INST_INT_IRQN (TIMA0_INT_IRQn)
|
||||
#define TIMER_1_INST_LOAD_VALUE (1091U)
|
||||
|
||||
|
||||
|
||||
/* Defines for UART_0 */
|
||||
#define UART_0_INST UART2
|
||||
#define UART_0_INST_FREQUENCY 24000000
|
||||
#define UART_0_INST_IRQHandler UART2_IRQHandler
|
||||
#define UART_0_INST_INT_IRQN UART2_INT_IRQn
|
||||
#define GPIO_UART_0_RX_PORT GPIOB
|
||||
#define GPIO_UART_0_TX_PORT GPIOB
|
||||
#define GPIO_UART_0_RX_PIN DL_GPIO_PIN_16
|
||||
#define GPIO_UART_0_TX_PIN DL_GPIO_PIN_15
|
||||
#define GPIO_UART_0_IOMUX_RX (IOMUX_PINCM33)
|
||||
#define GPIO_UART_0_IOMUX_TX (IOMUX_PINCM32)
|
||||
#define GPIO_UART_0_IOMUX_RX_FUNC IOMUX_PINCM33_PF_UART2_RX
|
||||
#define GPIO_UART_0_IOMUX_TX_FUNC IOMUX_PINCM32_PF_UART2_TX
|
||||
#define UART_0_BAUD_RATE (115200)
|
||||
#define UART_0_IBRD_24_MHZ_115200_BAUD (13)
|
||||
#define UART_0_FBRD_24_MHZ_115200_BAUD (1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Port definition for Pin Group GPIO_GRP_0 */
|
||||
#define GPIO_GRP_0_PORT (GPIOB)
|
||||
|
||||
/* Defines for PIN_0: GPIOB.17 with pinCMx 43 on package pin 36 */
|
||||
#define GPIO_GRP_0_PIN_0_PIN (DL_GPIO_PIN_17)
|
||||
#define GPIO_GRP_0_PIN_0_IOMUX (IOMUX_PINCM43)
|
||||
|
||||
|
||||
/* Defines for MCAN0 */
|
||||
#define MCAN0_INST CANFD0
|
||||
#define GPIO_MCAN0_CAN_TX_PORT GPIOA
|
||||
#define GPIO_MCAN0_CAN_TX_PIN DL_GPIO_PIN_26
|
||||
#define GPIO_MCAN0_IOMUX_CAN_TX (IOMUX_PINCM59)
|
||||
#define GPIO_MCAN0_IOMUX_CAN_TX_FUNC IOMUX_PINCM59_PF_CANFD0_CANTX
|
||||
#define GPIO_MCAN0_CAN_RX_PORT GPIOA
|
||||
#define GPIO_MCAN0_CAN_RX_PIN DL_GPIO_PIN_27
|
||||
#define GPIO_MCAN0_IOMUX_CAN_RX (IOMUX_PINCM60)
|
||||
#define GPIO_MCAN0_IOMUX_CAN_RX_FUNC IOMUX_PINCM60_PF_CANFD0_CANRX
|
||||
|
||||
|
||||
/* Defines for MCAN0 MCAN RAM configuration */
|
||||
#define MCAN0_INST_MCAN_STD_ID_FILT_START_ADDR (0)
|
||||
#define MCAN0_INST_MCAN_STD_ID_FILTER_NUM (1)
|
||||
#define MCAN0_INST_MCAN_EXT_ID_FILT_START_ADDR (48)
|
||||
#define MCAN0_INST_MCAN_EXT_ID_FILTER_NUM (1)
|
||||
#define MCAN0_INST_MCAN_TX_BUFF_START_ADDR (148)
|
||||
#define MCAN0_INST_MCAN_TX_BUFF_SIZE (2)
|
||||
#define MCAN0_INST_MCAN_FIFO_1_START_ADDR (192)
|
||||
#define MCAN0_INST_MCAN_FIFO_1_NUM (2)
|
||||
#define MCAN0_INST_MCAN_TX_EVENT_START_ADDR (164)
|
||||
#define MCAN0_INST_MCAN_TX_EVENT_SIZE (2)
|
||||
#define MCAN0_INST_MCAN_EXT_ID_AND_MASK (0x1FFFFFFFU)
|
||||
#define MCAN0_INST_MCAN_RX_BUFF_START_ADDR (208)
|
||||
#define MCAN0_INST_MCAN_FIFO_0_START_ADDR (172)
|
||||
#define MCAN0_INST_MCAN_FIFO_0_NUM (3)
|
||||
|
||||
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
void SYSCFG_DL_init(void);
|
||||
void SYSCFG_DL_initPower(void);
|
||||
void SYSCFG_DL_GPIO_init(void);
|
||||
void SYSCFG_DL_SYSCTL_init(void);
|
||||
void SYSCFG_DL_SYSCTL_CLK_init(void);
|
||||
void SYSCFG_DL_CAPTURE_0_init(void);
|
||||
void SYSCFG_DL_TIMER_0_init(void);
|
||||
void SYSCFG_DL_TIMER_1_init(void);
|
||||
void SYSCFG_DL_UART_0_init(void);
|
||||
|
||||
void SYSCFG_DL_MCAN0_init(void);
|
||||
|
||||
bool SYSCFG_DL_saveConfiguration(void);
|
||||
bool SYSCFG_DL_restoreConfiguration(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ti_msp_dl_config_h */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/ci/19700101 http://schema.mathworks.com/mf0/sl_data_duplicateandconsistencycheck/R2022b http://schema.mathworks.com/mf0/sl_modelref_info/R2023b http://schema.mathworks.com/mf0/slexec_mm_sto/R2023a_202208151321 http://schema.mathworks.com/mf0/sltp_mm/R2023a_202209151115">
|
||||
<ModelRefInfoRepo.ModelRefInfoRoot type="ModelRefInfoRepo.ModelRefInfoRoot" uuid="c423a4c2-c42e-4d68-a7d6-3c68c762f110">
|
||||
<ModelRefInfoRepo.ModelRefInfoRoot type="ModelRefInfoRepo.ModelRefInfoRoot" uuid="06330d8d-0b1f-42a7-ae66-18118dd967df">
|
||||
<JITEngines>sJSjS2nhFB3Qcky7Q7UDQFE</JITEngines>
|
||||
<JITEngines>sKuRTaq5s8EZI5Gj28zXs2E</JITEngines>
|
||||
<calibrationData type="ModelRefInfoRepo.CalibrationData" uuid="dff40f17-bcdf-4c37-95af-e03e67c08781">
|
||||
<calibrationData type="ModelRefInfoRepo.CalibrationData" uuid="3cc64475-251f-4ff3-a920-279e74c2a96c">
|
||||
<InternalData>[{"Name":"","Profile":""}]</InternalData>
|
||||
<ModelName>socTouchDisplay</ModelName>
|
||||
<RootIOData>[{"Name":"in_bTouchDetected","Profile":""},{"Name":"ip_u32TouchDuration_msec","Profile":""},{"Name":"ip_u32DisplayDuration_msec","Profile":""},{"Name":"Input","Profile":""},{"Name":"op_bDisplayStatus","Profile":""},{"Name":"op_bErrorStatus","Profile":""},{"Name":"op_u8HundredsPlace","Profile":""},{"Name":"op_u8TensPlace","Profile":""},{"Name":"op_u8OnesPlace","Profile":""}]</RootIOData>
|
||||
<RootIOData>[{"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":""}]</RootIOData>
|
||||
</calibrationData>
|
||||
<childModelRefInfo type="ModelRefInfoRepo.ChildModelRefInfo" uuid="48754e11-5d0e-458a-b67a-bdb64b45170d">
|
||||
<childModelRefInfo type="ModelRefInfoRepo.ChildModelRefInfo" uuid="f25ea66c-054e-4214-98cb-b2b70e582e67">
|
||||
<modelName>socTouchDisplay</modelName>
|
||||
<modelPath>socTouchDisplay</modelPath>
|
||||
</childModelRefInfo>
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
<dataDictionary>socTouchDisplay.sldd</dataDictionary>
|
||||
<dataDictionarySet>socTouchDisplay.sldd</dataDictionarySet>
|
||||
<dataDictionarySetForDataTypeCheck>socTouchDisplay.sldd</dataDictionarySetForDataTypeCheck>
|
||||
<dataSourceInfo type="ModelRefInfoRepo.DataSourceInfo" uuid="d0392e51-1d2b-483b-adf9-04d1f7dc1fd0">
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="04471474-cf64-48c8-8a61-61c3fb3cdfc0">
|
||||
<dataSourceInfo type="ModelRefInfoRepo.DataSourceInfo" uuid="b42a231a-3218-4971-9c5d-50824744d12a">
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="9a8ef6ee-cd60-402d-ac89-914ca9273d25">
|
||||
<includeAllSections>true</includeAllSections>
|
||||
<sourceName>socTouchDisplay.sldd</sourceName>
|
||||
<type>DataDictionary</type>
|
||||
</dataSources>
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="1ba4548b-b166-4a96-9479-a131e4340a86">
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="16035acd-f82b-414e-b1a1-ee6b9af935d8">
|
||||
<includeAllSections>true</includeAllSections>
|
||||
<sourceName>base workspace</sourceName>
|
||||
<type>BaseWorkspace</type>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<hasBwsAccessedByAnyModel>true</hasBwsAccessedByAnyModel>
|
||||
<hasNonVirtualConstantTs>true</hasNonVirtualConstantTs>
|
||||
<hasStatesModifiedInOutputUpdate>true</hasStatesModifiedInOutputUpdate>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="0da382bb-d9b8-4a6e-8024-f54ce44c3905">
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="04d81b25-c474-4e9c-8c09-2319e02a45b1">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -53,10 +53,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="c6e11a6f-85f9-472a-8c4f-04932b0e4040"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="1d76ece0-98aa-4aef-b697-d7d77c35f72d"/>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="4b52b55a-ea9b-41a7-8e79-8ea03f0cc9c9"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="0cd45c6a-812e-44bd-ab6c-0d0a5512fbd9"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="91652b38-7362-4fb1-8e80-180f8c57a19e">
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="2b667d6d-639f-4383-9bca-da5bcddf3c65">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -70,10 +70,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="06f459e4-ee47-42dd-86fe-788d6be67841"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="44e21e7b-b349-4b37-b488-2badadc45f69"/>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="9d9b3b4e-d610-4212-a446-4c969ea60437"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="f3309e88-67cd-450d-8adc-201037b7c178"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="69aef273-7467-4a72-be4e-9942e407dce2">
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="296946d2-5a11-4635-81c4-d4f31c47447b">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -87,10 +87,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="c69dd893-dc7b-4580-9019-c5a33c033cf0"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="65f49605-3848-4e57-805b-649ead2bc58a"/>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="8ac87951-0a5f-4e8f-a2ab-1a435f81c2f7"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="a0f3e557-cbac-43aa-919e-8d34587b5ba2"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="f2ca55ba-3ebf-45f2-a441-2f06cc1a598f">
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="38b825ec-62d3-449a-8fdb-7011b4bec927">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -104,8 +104,25 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="845b2d7f-8b9e-41f7-b61a-31a1a3051e97"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="9ee09362-f869-4a00-ab26-70c5c4520638"/>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="40b70236-15c8-4b09-b0df-7048497f8243"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="0798ea4d-1f6a-4f31-a884-80069f17da1d"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="722a749d-4325-4303-b88e-e33cd9299693">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<indexType>2</indexType>
|
||||
<originalPortNumber>4</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="13a0fa05-25db-4d4c-b6f6-552797705d3a"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="c0d48622-ab23-4464-8fc3-a3132dc39274"/>
|
||||
</inports>
|
||||
<isBdInSimModeForSimCodegenVariants>false</isBdInSimModeForSimCodegenVariants>
|
||||
<isInlineParamsOn>true</isInlineParamsOn>
|
||||
|
|
@ -113,6 +130,7 @@
|
|||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
|
|
@ -120,12 +138,13 @@
|
|||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<loggingSaveFormat>2</loggingSaveFormat>
|
||||
<maxFreqHz>-1.0</maxFreqHz>
|
||||
<numDataInputPorts>4</numDataInputPorts>
|
||||
<numDataInputPorts>5</numDataInputPorts>
|
||||
<numLoggableJacobianDStates>0</numLoggableJacobianDStates>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
|
|
@ -136,7 +155,7 @@
|
|||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="91427711-c988-42c7-941e-5fa2285ee3bb">
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="d11e053e-e358-47f5-9cbf-3f9e0b447db9">
|
||||
<hasSystemInitMethod>true</hasSystemInitMethod>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -148,10 +167,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="e62a5e9b-58d4-4231-830d-3d90ba27cfad"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="9b940b83-17ca-471e-b395-a6326f912463"/>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="a9bb6cb9-90c8-4d88-bd00-1c418c545113"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="6bd078e3-61f5-4e8b-ad02-722734612027"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="6b9e9057-adb2-4896-9d70-0dd9579b94d9">
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="66f29f9c-235f-41f6-9566-cfc8c591436a">
|
||||
<hasSystemInitMethod>true</hasSystemInitMethod>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
|
|
@ -164,10 +183,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="cb46f534-f936-4c5b-bb91-bb8351c76476"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="2338d864-4100-4233-a487-7ce855432e38"/>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="afc0a88f-2cda-45eb-a5e7-f78aa7dab6c7"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="1c61affe-d9a1-430a-b89f-d60cbaff6b88"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="3a9dcd48-ab47-42f0-8e42-1f1c06b60098">
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="0ad18af4-34db-4b9a-b8c2-748f5c70b7d4">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>2</originalPortNumber>
|
||||
|
|
@ -179,10 +198,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="2a458600-29a7-47e6-90b2-238c22446509"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="5a1bc24b-ad47-4fad-9428-9c857f9d8d9c"/>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="ba736367-0eca-48a5-be28-e90c5fcedadc"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="0b1fd699-8283-4ae3-b65d-8ad6a8a68132"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="5e204093-ee38-45b8-bd46-438d3765cda1">
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="8770e933-fafa-4a10-b5a8-176d897755ad">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>3</originalPortNumber>
|
||||
|
|
@ -194,10 +213,10 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="b56e9fea-84a2-4900-a41f-946714f917dc"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="1379f7e3-4f83-48b3-b50c-aabb9733533d"/>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="98e330e2-d543-4bab-8574-c928dc41616e"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="8eb2ff12-adb6-43d4-8310-553ff0eba64c"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="d3b8e248-f5a5-4ce1-ab09-458243094cb1">
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="73a1d0ff-1e45-42d4-991d-264721f7ac5e">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>4</originalPortNumber>
|
||||
|
|
@ -209,8 +228,8 @@
|
|||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="b7fc6574-a5da-442c-b659-e759138c0e4b"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="adbc514c-a22b-492a-ac4b-741a413439b0"/>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="9062923e-af0a-45c4-9cb0-fc981c8b46e0"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="8e9f5f6f-1c67-43fb-8638-17a5c6a26f47"/>
|
||||
</outports>
|
||||
<removeResetFunc>true</removeResetFunc>
|
||||
<runtimeNonFcnCallRateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
|
|
@ -224,50 +243,50 @@
|
|||
<solverStatusFlags>323</solverStatusFlags>
|
||||
<timingAndTaskingRegistry><?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="3a3d3d52-cd9c-47c0-a0c8-32e7580def99">
|
||||
<sto.Registry type="sto.Registry" uuid="cd25431f-875e-462e-90e6-77aba17625d3">
|
||||
<executionSpec>Undetermined</executionSpec>
|
||||
<identifier>socTouchDisplay</identifier>
|
||||
<clockRegistry type="sto.ClockRegistry" uuid="926692e5-6e1d-44ce-95bd-ec062455c3dd">
|
||||
<clocks type="sto.Timer" uuid="b6a56536-b6c2-4e08-a692-5478eb83994e">
|
||||
<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="b24d7f8a-e80b-4bf6-a138-35e053d007e1"/>
|
||||
<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="b24d7f8a-e80b-4bf6-a138-35e053d007e1">
|
||||
<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="04741580-1702-4d99-a71f-5c59fff197c6">
|
||||
<rateSpec type="sto.RateSpec" uuid="e2802860-1cd7-4f78-a3ea-f71eeea3095b">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
</rates>
|
||||
<baseRate type="sto.ClassicPeriodicDiscreteRate" uuid="66637882-0267-41e0-a267-d06135e27d03">
|
||||
<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="a1392d16-b148-4f54-a21b-6f8b08d0035f">
|
||||
<rateSpec type="sto.RateSpec" uuid="a04f93e4-1521-445e-8894-e52d5e91ab8e">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
</baseRate>
|
||||
</clocks>
|
||||
<clocks type="sto.Event" uuid="e41a78c8-b216-4f36-9dee-4f997b4b1c11">
|
||||
<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="90d6839c-de09-4d36-8a0c-4a5a598feba9">
|
||||
<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="1ff799ef-cf4a-4029-870d-05c901611246">
|
||||
<rateSpec type="sto.RateSpec" uuid="19ce4db5-4ab9-480c-b5ec-8fffafc7135e">
|
||||
<period>inf</period>
|
||||
<rateType>ModelWideParameterChangeEvent</rateType>
|
||||
</rateSpec>
|
||||
|
|
@ -275,15 +294,15 @@
|
|||
</clocks>
|
||||
<timeAdvanceMode>FixedStep</timeAdvanceMode>
|
||||
</clockRegistry>
|
||||
<taskRegistry type="sto.TaskRegistry" uuid="51c7559b-0d95-45c2-89b5-e8ca1b1a2a36">
|
||||
<rootTaskHierarchyElements type="sto.Task" uuid="83d195cc-1e47-4c1f-bf41-cf7515d90315">
|
||||
<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="ddbb3b2c-a7d0-41a7-9985-12f1dbe63b55">
|
||||
<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="9773adec-69fb-499f-b3d5-c885d4c27f15">
|
||||
<rateSpec type="sto.RateSpec" uuid="f3a4db8e-6eb5-4170-b182-f2fb8ee48e34">
|
||||
<period>inf</period>
|
||||
<rateType>ModelWideParameterChangeEvent</rateType>
|
||||
</rateSpec>
|
||||
|
|
@ -294,15 +313,15 @@
|
|||
<identifier>ModelWideParameterChangeEvent</identifier>
|
||||
<priority>-1</priority>
|
||||
</rootTaskHierarchyElements>
|
||||
<rootTaskHierarchyElements type="sto.Task" uuid="8d35a7a1-6a0f-4104-8229-9f1d048673ef">
|
||||
<rootTaskHierarchyElements type="sto.Task" uuid="d3bf08c5-2444-421e-8164-08c71bb6edf8">
|
||||
<isExecutable>true</isExecutable>
|
||||
<orderIndex>1</orderIndex>
|
||||
<rates type="sto.ClassicPeriodicDiscreteRate" uuid="cc569252-814e-451a-b975-9d4d66331c6d">
|
||||
<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="b90a1e82-5f37-4e57-8497-d7a2efda69c7">
|
||||
<rateSpec type="sto.RateSpec" uuid="d6123553-da2e-4156-bc60-26c4ac2e0a35">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
|
|
@ -313,11 +332,11 @@
|
|||
<identifier>_task0</identifier>
|
||||
<priority>40</priority>
|
||||
</rootTaskHierarchyElements>
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="2e3cd3f0-1e21-43b0-9c9c-83e394120168">
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="f2944dc6-df54-41da-8274-72899cb2e2c9">
|
||||
<clockIdentifier>socTouchDisplay::defaultTimer</clockIdentifier>
|
||||
<taskIdentifier>_task0</taskIdentifier>
|
||||
</taskDependencyGraph>
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="dd557f49-849f-47e0-be4f-d57d5f19b2d6">
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="e0cf3055-a235-4970-a1cf-fff869fdec18">
|
||||
<clockIdentifier>ParameterChangeEvent</clockIdentifier>
|
||||
<taskIdentifier>ModelWideParameterChangeEvent</taskIdentifier>
|
||||
</taskDependencyGraph>
|
||||
|
|
@ -326,10 +345,10 @@
|
|||
</sto.Registry>
|
||||
</slexec_sto></timingAndTaskingRegistry>
|
||||
<zeroInternalMemoryAtStartupUnchecked>true</zeroInternalMemoryAtStartupUnchecked>
|
||||
<FMUBlockMap type="ModelRefInfoRepo.FMUBlockInfo" uuid="69cbfdd1-86ba-47e6-b23f-a357ee66437a"/>
|
||||
<codeGenInfo type="ModelRefInfoRepo.CodeGenInformation" uuid="dede7188-05e5-44b5-8df7-bb027da4bc9f"/>
|
||||
<compiledVariantInfos type="ModelRefInfoRepo.CompiledVariantInfoMap" uuid="44e63a7b-6c81-4d60-b7d2-92443f03274a"/>
|
||||
<configSettingsForConsistencyChecks type="ModelRefInfoRepo.ConfigSettingsForConsistencyChecks" uuid="ec71486b-3f4d-4d70-a1ce-6034e5c16e5c">
|
||||
<FMUBlockMap type="ModelRefInfoRepo.FMUBlockInfo" uuid="3e8b716c-9243-4ffc-9573-dbe5a7704f57"/>
|
||||
<codeGenInfo type="ModelRefInfoRepo.CodeGenInformation" uuid="a2756deb-d404-4389-b200-b09a703dc57c"/>
|
||||
<compiledVariantInfos type="ModelRefInfoRepo.CompiledVariantInfoMap" uuid="64d47c18-6cd8-4fba-b9c1-26d4a8d02673"/>
|
||||
<configSettingsForConsistencyChecks type="ModelRefInfoRepo.ConfigSettingsForConsistencyChecks" uuid="e0f2fd7e-9e9a-4569-b6ea-f3c554c5c137">
|
||||
<consistentOutportInitialization>true</consistentOutportInitialization>
|
||||
<fixedStepSize>.1</fixedStepSize>
|
||||
<frameDiagnosticSetting>2</frameDiagnosticSetting>
|
||||
|
|
@ -339,7 +358,7 @@
|
|||
<simSIMDOptimization>1</simSIMDOptimization>
|
||||
<solverName>FixedStepDiscrete</solverName>
|
||||
<solverType>SOLVER_TYPE_FIXEDSTEP</solverType>
|
||||
<hardwareSettings type="ModelRefInfoRepo.HardwareSettings" uuid="767f4170-c31a-4d8b-a9c6-b3f27c3c07da">
|
||||
<hardwareSettings type="ModelRefInfoRepo.HardwareSettings" uuid="f91b372c-4d10-4c2e-a9e3-20226af61a22">
|
||||
<prodBitPerChar>8</prodBitPerChar>
|
||||
<prodBitPerDouble>64</prodBitPerDouble>
|
||||
<prodBitPerFloat>32</prodBitPerFloat>
|
||||
|
|
@ -355,13 +374,14 @@
|
|||
<prodWordSize>64</prodWordSize>
|
||||
</hardwareSettings>
|
||||
</configSettingsForConsistencyChecks>
|
||||
<controllableInputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="7651d61a-d0b0-4e02-bc29-92248e48de24"/>
|
||||
<controllableOutputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="ced402d5-0110-476d-9f88-0d9ce97906f8"/>
|
||||
<dataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="6df60948-ecf5-41a0-a997-438d13f0e9bc">
|
||||
<controllableInputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="fcebf00d-ba3c-47e6-9c59-baf579ac3d84"/>
|
||||
<controllableOutputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="dc22734d-1f30-4a67-a8c8-77c50a021870"/>
|
||||
<dataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="df4e46cd-befa-4229-ae78-a022b917ba1d">
|
||||
<compDataInputPorts>0</compDataInputPorts>
|
||||
<compDataInputPorts>1</compDataInputPorts>
|
||||
<compDataInputPorts>2</compDataInputPorts>
|
||||
<compDataInputPorts>3</compDataInputPorts>
|
||||
<compDataInputPorts>4</compDataInputPorts>
|
||||
<compDataOutputPorts>0</compDataOutputPorts>
|
||||
<compDataOutputPorts>1</compDataOutputPorts>
|
||||
<compDataOutputPorts>2</compDataOutputPorts>
|
||||
|
|
@ -371,87 +391,95 @@
|
|||
<dataInputPorts>1</dataInputPorts>
|
||||
<dataInputPorts>2</dataInputPorts>
|
||||
<dataInputPorts>3</dataInputPorts>
|
||||
<dataInputPorts>4</dataInputPorts>
|
||||
<dataOutputPorts>0</dataOutputPorts>
|
||||
<dataOutputPorts>1</dataOutputPorts>
|
||||
<dataOutputPorts>2</dataOutputPorts>
|
||||
<dataOutputPorts>3</dataOutputPorts>
|
||||
<dataOutputPorts>4</dataOutputPorts>
|
||||
</dataPortGroup>
|
||||
<expFcnUnconnectedDataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="d59044c4-b0ef-4623-9710-bed667db30b0"/>
|
||||
<interfaceParameterInfo type="ModelRefInfoRepo.InterfaceParameterInfo" uuid="f67248e8-d518-4835-9bcd-0d8d2cb6ae59"/>
|
||||
<messageInfo type="ModelRefInfoRepo.MessageInformation" uuid="f9e594a2-0b38-40e7-83b6-6c60055c4b8a"/>
|
||||
<methodInfo type="ModelRefInfoRepo.MethodExistenceInfo" uuid="7129bfef-595c-412a-bcf2-448a8a3d1a38">
|
||||
<expFcnUnconnectedDataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="55f0dca5-8780-44ea-8b0c-80cab8b94d43"/>
|
||||
<interfaceParameterInfo type="ModelRefInfoRepo.InterfaceParameterInfo" uuid="639db967-aa0d-4c0a-8211-8648e0126245"/>
|
||||
<messageInfo type="ModelRefInfoRepo.MessageInformation" uuid="a8103aa5-7ba4-45d6-9994-ad82749265db"/>
|
||||
<methodInfo type="ModelRefInfoRepo.MethodExistenceInfo" uuid="1f87407e-afbb-4d35-a77b-0ddb2fe0462a">
|
||||
<hasEnableMethod>true</hasEnableMethod>
|
||||
<hasSystemInitializeMethod>true</hasSystemInitializeMethod>
|
||||
<hasSystemResetMethod>true</hasSystemResetMethod>
|
||||
<hasTerminateMethod>true</hasTerminateMethod>
|
||||
<hasUpdateMethod>true</hasUpdateMethod>
|
||||
</methodInfo>
|
||||
<periodicEventPortUnsupportedBlockInfo type="ModelRefInfoRepo.PeriodicEventPortUnsupportedBlockInfo" uuid="5ce766fa-e0cd-47d6-a3db-554509f826c7"/>
|
||||
<portGroupsRequireSameRate type="ModelRefInfoRepo.PortGroupsRequireSameRate" uuid="2bc83336-826c-4245-89c8-f506be71f9b2">
|
||||
<DSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="383ebe57-9cd5-4789-b1fe-5e9ff9ce2ec0"/>
|
||||
<GlobalDSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="10b75860-edff-4a5a-82fa-90bd3debdb59"/>
|
||||
<mergedPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="1d725e25-8ced-4deb-bcf2-09e4f08bd6e2"/>
|
||||
<periodicEventPortUnsupportedBlockInfo type="ModelRefInfoRepo.PeriodicEventPortUnsupportedBlockInfo" uuid="14206dc0-1fd6-4dba-8c74-dd99a845570e"/>
|
||||
<portGroupsRequireSameRate type="ModelRefInfoRepo.PortGroupsRequireSameRate" uuid="59052a57-cbe4-4463-83d9-41146784d92f">
|
||||
<DSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="c6117d1e-18f0-4b5f-aa4f-223d9b0d2383"/>
|
||||
<GlobalDSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="f78ef5ea-a1be-4233-ad7b-86e4091dab6f"/>
|
||||
<mergedPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="1b2928e2-9c91-4ab4-9ba2-604d814052a7"/>
|
||||
</portGroupsRequireSameRate>
|
||||
<rateBasedMdlGlobalDSMRateSpec type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="0dcb5c09-7687-489b-9215-59557e94f89d"/>
|
||||
<rateSpecOfGlobalDSMAccessedByDescExpFcnMdlMap type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="18204780-05a6-47df-85a7-32adb2fa5988"/>
|
||||
<rootBlockDiagramInterface type="ci.Model" uuid="54e390f9-b2e4-435c-b43b-57734de58ae5">
|
||||
<p_RootComponentInterface type="ci.ComponentInterface" uuid="129c9357-1e43-4cde-870a-483e5f06ca82">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="84833d01-b9da-401e-a7fa-4190816cd995">
|
||||
<rateBasedMdlGlobalDSMRateSpec type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="c5c17c96-96d2-495c-b462-ee039088a145"/>
|
||||
<rateSpecOfGlobalDSMAccessedByDescExpFcnMdlMap type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="e5d0c96b-d583-466f-a4dc-7313b276fa4a"/>
|
||||
<rootBlockDiagramInterface type="ci.Model" uuid="f9aa547e-87b9-4a50-89de-ad733cfc8358">
|
||||
<p_RootComponentInterface type="ci.ComponentInterface" uuid="b12fc1fe-b6e0-422f-a979-cfd08ffff44c">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="288fd37a-5572-433c-afa5-132c04394ef8">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>in_bTouchDetected</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="c195fde1-00dc-4ccc-8e3b-b60ff524bca5">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="12ff4a35-82b6-4cf6-842b-0877dc1d5209">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>ip_u32TouchDuration_msec</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="16377543-358e-4a08-8d57-7eabf48849d4">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="cff393c9-d93f-4727-9243-b7b7be826450">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>ip_u32DisplayDuration_msec</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="f9b5f34e-f0d1-4091-ace0-c918d7f7914b">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="260520bf-4fbf-49d9-ae62-38cf75c4de46">
|
||||
<p_ComputedNumericDimensions>10.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>CAN_MESSAGE_BUS</p_ComputedType>
|
||||
<p_Name>Input</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="aebccee6-adcc-4ecb-886d-dc95a9d1520c">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint32</p_ComputedType>
|
||||
<p_Name>ip_u32canId</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_Name>socTouchDisplay</p_Name>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="4ea5d474-2a0a-4120-a8bc-d6a8454d4c72">
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="c5bef65f-2e96-4186-900c-b3bb4aba9989">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>boolean</p_ComputedType>
|
||||
<p_Name>op_bDisplayStatus</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="bbbee058-9d0b-40e7-b09c-ae5535e94752">
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="a2addc16-d6d5-4b5e-8e70-877f7f9a557b">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>boolean</p_ComputedType>
|
||||
<p_Name>op_bErrorStatus</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="873224f0-c19f-4069-b929-897a6e7e903b">
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="615aaec8-58b0-4ba0-a870-e05720b3773a">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint8</p_ComputedType>
|
||||
<p_Name>op_u8HundredsPlace</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="60b84ff1-b8ab-4abf-9a7f-82eb57be56c0">
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="c0fdcbb2-942c-4639-af9a-95c6eec04845">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint8</p_ComputedType>
|
||||
<p_Name>op_u8TensPlace</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="e6ac93cd-5bfa-47fb-b521-fb99fee3c438">
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="0c95a3fd-f88a-4c9c-b98e-9f6fa2d41109">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
|
|
@ -461,7 +489,7 @@
|
|||
<p_Type>ROOT</p_Type>
|
||||
</p_RootComponentInterface>
|
||||
</rootBlockDiagramInterface>
|
||||
<simulinkFunctions type="ModelRefInfoRepo.SimulinkFunctions" uuid="577f9e88-4dd7-4d20-b733-c4f902f7e705">
|
||||
<simulinkFunctions type="ModelRefInfoRepo.SimulinkFunctions" uuid="40b4b019-7b2f-4041-83bb-22b4b7e0ac38">
|
||||
<compSimulinkFunctionCatalog></compSimulinkFunctionCatalog>
|
||||
</simulinkFunctions>
|
||||
<sltpContext type="sltp.mm.core.Context" uuid="9163d92d-0590-41fc-b13d-3bf36253804b">
|
||||
|
|
@ -489,6 +517,10 @@
|
|||
<dataName>portip_u32TouchDuration_msec</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="adc4eccc-5298-47f0-8d61-7a766ff78265">
|
||||
<dataName>portip_u32canId</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="77d0d2a5-4fc8-4b05-8e88-88c7d9f48503">
|
||||
<dataName>portop_bDisplayStatus</dataName>
|
||||
<type>RootOutport</type>
|
||||
|
|
@ -575,19 +607,19 @@
|
|||
</subgraph>
|
||||
</rootTask>
|
||||
</sltpContext>
|
||||
<stateWriterToOwnerMap type="ModelRefInfoRepo.StateWriterInfo" uuid="22a8b72c-4272-4705-b437-629711bebca9"/>
|
||||
<stoClientDataRegistry type="sto.ClientDataRegistry" uuid="5d8158e7-81e6-41d7-aab9-eb91fcaa7ff5">
|
||||
<dataSets type="sto.ClientClockNamedDataSet" uuid="5bd5964e-9d18-49f3-9232-f95682fa9fc2">
|
||||
<stateWriterToOwnerMap type="ModelRefInfoRepo.StateWriterInfo" uuid="d4596d5a-82a2-4fbf-a6bd-240b84e32d12"/>
|
||||
<stoClientDataRegistry type="sto.ClientDataRegistry" uuid="6cf327a2-1192-4222-abbf-2eb55ba5e358">
|
||||
<dataSets type="sto.ClientClockNamedDataSet" uuid="39f73b00-9d41-460a-a9a8-7e71df411ef6">
|
||||
<tag>sltpEvents</tag>
|
||||
</dataSets>
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="edf2c48f-5baa-46f9-8bff-1e8f0afa3fd0">
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="da47f9da-a730-42f7-9f37-617ade1e4b4d">
|
||||
<tag>sltpTaskGroups</tag>
|
||||
</dataSets>
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="cb57e322-4a7b-43a5-941d-7ef176e52203">
|
||||
<dSet type="ModelRefInfoRepo.SltpTaskData" uuid="b784d6cd-de7c-4b5e-9098-c7cdc8228345"/>
|
||||
<tSet type="ModelRefInfoRepo.SltpTaskData" uuid="b784d6cd-de7c-4b5e-9098-c7cdc8228345">
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="0068dcf7-d91f-4494-9a94-cffdd92acdb1">
|
||||
<dSet type="ModelRefInfoRepo.SltpTaskData" uuid="133a0a07-2b63-44b7-b58e-998084ea0e7f"/>
|
||||
<tSet type="ModelRefInfoRepo.SltpTaskData" uuid="133a0a07-2b63-44b7-b58e-998084ea0e7f">
|
||||
<dataName>D1</dataName>
|
||||
<linkedSet type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="cb57e322-4a7b-43a5-941d-7ef176e52203"/>
|
||||
<linkedSet type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="0068dcf7-d91f-4494-9a94-cffdd92acdb1"/>
|
||||
<id type="sto.TaskHierarchyElementId">
|
||||
<clockId>socTouchDisplay::defaultTimer</clockId>
|
||||
<id>_task0</id>
|
||||
|
|
@ -596,6 +628,6 @@
|
|||
<tag>sltpTasks</tag>
|
||||
</dataSets>
|
||||
</stoClientDataRegistry>
|
||||
<varTsUIDMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="dea2d909-c171-4d7c-a17e-56fed8709aeb"/>
|
||||
<varTsUIDMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="2725448d-e310-4475-8ae8-ec6f113d2b9f"/>
|
||||
</ModelRefInfoRepo.ModelRefInfoRoot>
|
||||
</MF0>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
|
|||
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* File: rtGetInf.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T inf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
inf = rtGetInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0x7FF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
inf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return inf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetInfF(void)
|
||||
{
|
||||
IEEESingle infF;
|
||||
infF.wordL.wordLuint = 0x7F800000U;
|
||||
return infF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetMinusInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T minf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
minf = rtGetMinusInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
minf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return minf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetMinusInfF(void)
|
||||
{
|
||||
IEEESingle minfF;
|
||||
minfF.wordL.wordLuint = 0xFF800000U;
|
||||
return minfF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* File: rtGetInf.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetInf_h_
|
||||
#define RTW_HEADER_rtGetInf_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetInf(void);
|
||||
extern real32_T rtGetInfF(void);
|
||||
extern real_T rtGetMinusInf(void);
|
||||
extern real32_T rtGetMinusInfF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetInf_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* File: rtGetNaN.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetNaN.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtNaN needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetNaN(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T nan = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
nan = rtGetNaNF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF80000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
nan = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return nan;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtNaNF needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetNaNF(void)
|
||||
{
|
||||
IEEESingle nanF = { { 0.0F } };
|
||||
|
||||
nanF.wordL.wordLuint = 0xFFC00000U;
|
||||
return nanF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* File: rtGetNaN.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetNaN_h_
|
||||
#define RTW_HEADER_rtGetNaN_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetNaN(void);
|
||||
extern real32_T rtGetNaNF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetNaN_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
* File: rt_nonfinite.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtGetNaN.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
real_T rtInf;
|
||||
real_T rtMinusInf;
|
||||
real_T rtNaN;
|
||||
real32_T rtInfF;
|
||||
real32_T rtMinusInfF;
|
||||
real32_T rtNaNF;
|
||||
|
||||
/*
|
||||
* Initialize the rtInf, rtMinusInf, and rtNaN needed by the
|
||||
* generated code. NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
void rt_InitInfAndNaN(size_t realSize)
|
||||
{
|
||||
(void) (realSize);
|
||||
rtNaN = rtGetNaN();
|
||||
rtNaNF = rtGetNaNF();
|
||||
rtInf = rtGetInf();
|
||||
rtInfF = rtGetInfF();
|
||||
rtMinusInf = rtGetMinusInf();
|
||||
rtMinusInfF = rtGetMinusInfF();
|
||||
}
|
||||
|
||||
/* Test if value is infinite */
|
||||
boolean_T rtIsInf(real_T value)
|
||||
{
|
||||
return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if single-precision value is infinite */
|
||||
boolean_T rtIsInfF(real32_T value)
|
||||
{
|
||||
return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if value is not a number */
|
||||
boolean_T rtIsNaN(real_T value)
|
||||
{
|
||||
boolean_T result = (boolean_T) 0;
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
if (bitsPerReal == 32U) {
|
||||
result = rtIsNaNF((real32_T)value);
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.fltVal = value;
|
||||
result = (boolean_T)((tmpVal.bitVal.words.wordH & 0x7FF00000) == 0x7FF00000 &&
|
||||
( (tmpVal.bitVal.words.wordH & 0x000FFFFF) != 0 ||
|
||||
(tmpVal.bitVal.words.wordL != 0) ));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Test if single-precision value is not a number */
|
||||
boolean_T rtIsNaNF(real32_T value)
|
||||
{
|
||||
IEEESingle tmp;
|
||||
tmp.wordL.wordLreal = value;
|
||||
return (boolean_T)( (tmp.wordL.wordLuint & 0x7F800000) == 0x7F800000 &&
|
||||
(tmp.wordL.wordLuint & 0x007FFFFF) != 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* File: rt_nonfinite.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rt_nonfinite_h_
|
||||
#define RTW_HEADER_rt_nonfinite_h_
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#define NOT_USING_NONFINITE_LITERALS 1
|
||||
|
||||
extern real_T rtInf;
|
||||
extern real_T rtMinusInf;
|
||||
extern real_T rtNaN;
|
||||
extern real32_T rtInfF;
|
||||
extern real32_T rtMinusInfF;
|
||||
extern real32_T rtNaNF;
|
||||
extern void rt_InitInfAndNaN(size_t realSize);
|
||||
extern boolean_T rtIsInf(real_T value);
|
||||
extern boolean_T rtIsInfF(real32_T value);
|
||||
extern boolean_T rtIsNaN(real_T value);
|
||||
extern boolean_T rtIsNaNF(real32_T value);
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordH;
|
||||
uint32_T wordL;
|
||||
} words;
|
||||
} BigEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordL;
|
||||
uint32_T wordH;
|
||||
} words;
|
||||
} LittleEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
real32_T wordLreal;
|
||||
uint32_T wordLuint;
|
||||
} wordL;
|
||||
} IEEESingle;
|
||||
|
||||
#endif /* RTW_HEADER_rt_nonfinite_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
#include "socTouchDisplay.h"
|
||||
#include "rtwtypes.h"
|
||||
#include <math.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#include "socTouchDisplay_private.h"
|
||||
|
||||
/* Named constants for Chart: '<Root>/Chart' */
|
||||
|
|
@ -48,11 +47,12 @@ RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M = &socTouchDisplay_M_;
|
|||
/* Model step function */
|
||||
void socTouchDisplay_step(void)
|
||||
{
|
||||
real_T tmp;
|
||||
int32_T i;
|
||||
int32_T s3_iter;
|
||||
uint32_T tmp_0;
|
||||
uint32_T tmp;
|
||||
uint8_T rtb_Cast;
|
||||
boolean_T Memory_PreviousInput;
|
||||
boolean_T rtb_Equal;
|
||||
boolean_T rtb_Memory;
|
||||
|
||||
/* Outputs for Iterator SubSystem: '<Root>/canMsgDecode' incorporates:
|
||||
|
|
@ -71,842 +71,38 @@ void socTouchDisplay_step(void)
|
|||
&socTouchDisplay_B.Selector.Length, &socTouchDisplay_B.Selector.Data[0],
|
||||
&socTouchDisplay_B.SFunction);
|
||||
|
||||
/* RelationalOperator: '<S3>/Equal' incorporates:
|
||||
* Inport: '<Root>/ip_u32canId'
|
||||
*/
|
||||
rtb_Equal = (socTouchDisplay_B.SFunction.ID == socTouchDisplay_U.ip_u32canId);
|
||||
|
||||
/* Outputs for Enabled SubSystem: '<S3>/Enabled Subsystem' incorporates:
|
||||
* EnablePort: '<S5>/Enable'
|
||||
*/
|
||||
/* Logic: '<S3>/AND' incorporates:
|
||||
* Constant: '<S3>/Constant'
|
||||
* RelationalOperator: '<S3>/Equal1'
|
||||
*/
|
||||
if ((socTouchDisplay_B.SFunction.Data[0] == 2) && rtb_Equal) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
/* SignalConversion generated from: '<S5>/In1' */
|
||||
socTouchDisplay_B.In1[i] = socTouchDisplay_B.SFunction.Data[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* End of Logic: '<S3>/AND' */
|
||||
/* End of Outputs for SubSystem: '<S3>/Enabled Subsystem' */
|
||||
|
||||
/* DataTypeConversion: '<S3>/Cast' */
|
||||
rtb_Cast = socTouchDisplay_B.In1[2];
|
||||
|
||||
/* Memory: '<S3>/Memory' */
|
||||
rtb_Memory = Memory_PreviousInput;
|
||||
|
||||
/* S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
{
|
||||
/* S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
if ((8 == socTouchDisplay_B.SFunction.Length) &&
|
||||
(socTouchDisplay_B.SFunction.ID != INVALID_CAN_ID) ) {
|
||||
if ((220839530 == socTouchDisplay_B.SFunction.ID) && (1U ==
|
||||
socTouchDisplay_B.SFunction.Extended) ) {
|
||||
{
|
||||
/* --------------- START Unpacking signal 16 ------------------
|
||||
* startBit = 0
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
{
|
||||
real_T outValue = 0;
|
||||
|
||||
{
|
||||
uint8_T unpackedValue = 0;
|
||||
|
||||
{
|
||||
uint8_T tempValue = (uint8_T) (0);
|
||||
|
||||
{
|
||||
tempValue = tempValue | (uint8_T)
|
||||
(socTouchDisplay_B.SFunction.Data[0]);
|
||||
}
|
||||
|
||||
unpackedValue = tempValue;
|
||||
}
|
||||
|
||||
outValue = (real_T) (unpackedValue);
|
||||
}
|
||||
|
||||
{
|
||||
real_T result = (real_T) outValue;
|
||||
socTouchDisplay_B.CANUnpack_o17 = result;
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------- START Unpacking signal 0 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 1 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 2 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 3 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 4 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 5 ------------------
|
||||
* startBit = 56
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 6 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 7 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 8 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 9 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 10 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 11 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 12 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 13 ------------------
|
||||
* startBit = 56
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 14 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 15 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 17 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 18 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 19 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 20 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 21 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 22 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 23 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 24 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 25 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 26 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 27 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 28 ------------------
|
||||
* startBit = 8
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 29 ------------------
|
||||
* startBit = 9
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 30 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 31 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 32 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 33 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 34 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 35 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 36 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 37 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 38 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 39 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 40 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 41 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 42 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 43 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 44 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 45 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 46 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 47 ------------------
|
||||
* startBit = 9
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 48 ------------------
|
||||
* startBit = 8
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 49 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 50 ------------------
|
||||
* startBit = 10
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 51 ------------------
|
||||
* startBit = 11
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 52 ------------------
|
||||
* startBit = 13
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 53 ------------------
|
||||
* startBit = 14
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 54 ------------------
|
||||
* startBit = 15
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 55 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/* Perform the mode dependency check to value */
|
||||
if (socTouchDisplay_B.CANUnpack_o17 == 2.0) {
|
||||
{
|
||||
real_T outValue = 0;
|
||||
|
||||
{
|
||||
uint8_T unpackedValue = 0;
|
||||
|
||||
{
|
||||
uint8_T tempValue = (uint8_T) (0);
|
||||
|
||||
{
|
||||
tempValue = tempValue | (uint8_T)
|
||||
(socTouchDisplay_B.SFunction.Data[2]);
|
||||
}
|
||||
|
||||
unpackedValue = tempValue;
|
||||
}
|
||||
|
||||
outValue = (real_T) (unpackedValue);
|
||||
}
|
||||
|
||||
{
|
||||
real_T result = (real_T) outValue;
|
||||
socTouchDisplay_B.CANUnpack_o56 = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------- START Unpacking signal 56 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 57 ------------------
|
||||
* startBit = 12
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* DataTypeConversion: '<S3>/Cast' */
|
||||
tmp = floor(socTouchDisplay_B.CANUnpack_o56);
|
||||
if (rtIsNaN(tmp) || rtIsInf(tmp)) {
|
||||
tmp = 0.0;
|
||||
} else {
|
||||
tmp = fmod(tmp, 256.0);
|
||||
}
|
||||
|
||||
if (tmp < 0.0) {
|
||||
rtb_Cast = (uint8_T)-(int8_T)(uint8_T)-tmp;
|
||||
} else {
|
||||
rtb_Cast = (uint8_T)tmp;
|
||||
}
|
||||
|
||||
/* End of DataTypeConversion: '<S3>/Cast' */
|
||||
|
||||
/* Update for Memory: '<S3>/Memory' incorporates:
|
||||
* Logic: '<S3>/OR'
|
||||
* RelationalOperator: '<S3>/Equal'
|
||||
*/
|
||||
Memory_PreviousInput = ((socTouchDisplay_B.SFunction.ID == 220839530U) ||
|
||||
Memory_PreviousInput);
|
||||
Memory_PreviousInput = (rtb_Equal || Memory_PreviousInput);
|
||||
}
|
||||
|
||||
/* End of Outputs for SubSystem: '<Root>/canMsgDecode' */
|
||||
|
|
@ -1012,9 +208,9 @@ void socTouchDisplay_step(void)
|
|||
socTouchDisplay_DW.durationCounter_2 = 0U;
|
||||
}
|
||||
|
||||
tmp_0 = (uint32_T)ceil(socTouchDisplay_U.ip_u32TouchDuration_msec);
|
||||
if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_2 * 100) >
|
||||
tmp_0) && Memory_PreviousInput) {
|
||||
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;
|
||||
|
||||
|
|
@ -1026,7 +222,7 @@ void socTouchDisplay_step(void)
|
|||
}
|
||||
|
||||
if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_1_g * 100) >
|
||||
tmp_0) && (!Memory_PreviousInput)) {
|
||||
tmp) && (!Memory_PreviousInput)) {
|
||||
socTouchDisplay_DW.temporalCounter_i1 = 0U;
|
||||
socTouchDisplay_DW.is_c3_socTouchDisplay =
|
||||
socTouchDisplay_IN_displayError;
|
||||
|
|
@ -1114,18 +310,7 @@ void socTouchDisplay_step(void)
|
|||
/* Model initialize function */
|
||||
void socTouchDisplay_initialize(void)
|
||||
{
|
||||
/* Registration code */
|
||||
|
||||
/* initialize non-finites */
|
||||
rt_InitInfAndNaN(sizeof(real_T));
|
||||
|
||||
/* SystemInitialize for Iterator SubSystem: '<Root>/canMsgDecode' */
|
||||
|
||||
/* Start for S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
|
||||
/*-----------S-Function Block: <S3>/CAN Unpack -----------------*/
|
||||
|
||||
/* End of SystemInitialize for SubSystem: '<Root>/canMsgDecode' */
|
||||
/* (no initialization code required) */
|
||||
}
|
||||
|
||||
/* Model terminate function */
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
@ -18,11 +18,9 @@
|
|||
#ifndef socTouchDisplay_COMMON_INCLUDES_
|
||||
#define socTouchDisplay_COMMON_INCLUDES_
|
||||
#include "rtwtypes.h"
|
||||
#include "can_message.h"
|
||||
#endif /* socTouchDisplay_COMMON_INCLUDES_ */
|
||||
|
||||
#include "socTouchDisplay_types.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/* Macros for accessing real-time model data structure */
|
||||
|
|
@ -38,64 +36,7 @@
|
|||
typedef struct {
|
||||
CAN_MESSAGE_BUS Selector; /* '<S3>/Selector' */
|
||||
CAN_MESSAGE_BUS SFunction; /* '<S3>/S-Function' */
|
||||
real_T CANUnpack_o1; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o2; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o3; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o4; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o5; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o6; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o7; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o8; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o9; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o10; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o11; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o12; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o13; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o14; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o15; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o16; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o17; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o18; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o19; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o20; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o21; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o22; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o23; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o24; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o25; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o26; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o27; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o28; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o29; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o30; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o31; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o32; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o33; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o34; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o35; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o36; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o37; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o38; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o39; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o40; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o41; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o42; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o43; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o44; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o45; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o46; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o47; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o48; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o49; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o50; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o51; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o52; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o53; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o54; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o55; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o56; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o57; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o58; /* '<S3>/CAN Unpack' */
|
||||
uint8_T In1[8]; /* '<S5>/In1' */
|
||||
} B_socTouchDisplay_T;
|
||||
|
||||
/* Block states (default storage) for system '<Root>' */
|
||||
|
|
@ -105,8 +46,6 @@ typedef struct {
|
|||
uint32_T temporalCounter_i1; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_1_g; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_2; /* '<Root>/Chart' */
|
||||
int_T CANUnpack_ModeSignalID; /* '<S3>/CAN Unpack' */
|
||||
int_T CANUnpack_StatusPortID; /* '<S3>/CAN Unpack' */
|
||||
uint8_T is_active_c1_socTouchDisplay;/* '<Root>/Chart1' */
|
||||
uint8_T is_c1_socTouchDisplay; /* '<Root>/Chart1' */
|
||||
uint8_T is_active_c3_socTouchDisplay;/* '<Root>/Chart' */
|
||||
|
|
@ -119,6 +58,7 @@ typedef struct {
|
|||
real_T ip_u32TouchDuration_msec; /* '<Root>/ip_u32TouchDuration_msec' */
|
||||
real_T ip_u32DisplayDuration_msec; /* '<Root>/ip_u32DisplayDuration_msec' */
|
||||
CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '<Root>/Input' */
|
||||
uint32_T ip_u32canId; /* '<Root>/ip_u32canId' */
|
||||
} ExtU_socTouchDisplay_T;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
|
|
@ -182,6 +122,7 @@ extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M;
|
|||
* '<S2>' : 'socTouchDisplay/Chart1'
|
||||
* '<S3>' : 'socTouchDisplay/canMsgDecode'
|
||||
* '<S4>' : 'socTouchDisplay/displayData'
|
||||
* '<S5>' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem'
|
||||
*/
|
||||
#endif /* RTW_HEADER_socTouchDisplay_h_ */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
## Makefile generated for component 'socTouchDisplay'.
|
||||
##
|
||||
## Makefile : socTouchDisplay.mk
|
||||
## Generated on : Mon Oct 28 16:04:26 2024
|
||||
## Generated on : Thu Nov 07 22:32:48 2024
|
||||
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/socTouchDisplay.exe
|
||||
## Product type : executable
|
||||
##
|
||||
|
|
@ -23,7 +23,7 @@ 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:/MATLAB/bs_touchAndLcd
|
||||
START_DIR = D:/AAR/cantouart_ti/bs_touchAndLcd
|
||||
SOLVER =
|
||||
SOLVER_OBJ =
|
||||
CLASSIC_INTERFACE = 0
|
||||
|
|
@ -183,7 +183,7 @@ DEFINES = $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_STAN
|
|||
## SOURCE FILES
|
||||
###########################################################################
|
||||
|
||||
SRCS = $(START_DIR)/socTouchDisplay_ert_rtw/rtGetInf.c $(START_DIR)/socTouchDisplay_ert_rtw/rtGetNaN.c $(START_DIR)/socTouchDisplay_ert_rtw/rt_nonfinite.c $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c
|
||||
SRCS = $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c
|
||||
|
||||
MAIN_SRC = $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ ALL_SRCS = $(SRCS) $(MAIN_SRC)
|
|||
## OBJECTS
|
||||
###########################################################################
|
||||
|
||||
OBJS = rtGetInf.obj rtGetNaN.obj rt_nonfinite.obj socTouchDisplay.obj
|
||||
OBJS = socTouchDisplay.obj
|
||||
|
||||
MAIN_OBJ = ert_main.obj
|
||||
|
||||
|
|
@ -515,18 +515,6 @@ ert_main.obj : $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c
|
|||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rtGetInf.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rtGetInf.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rtGetNaN.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rtGetNaN.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rt_nonfinite.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rt_nonfinite.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
socTouchDisplay.obj : $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,2 @@
|
|||
ert_main.obj
|
||||
rtGetInf.obj
|
||||
rtGetNaN.obj
|
||||
rt_nonfinite.obj
|
||||
socTouchDisplay.obj
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
-ID:/MATLAB/bs_touchAndLcd
|
||||
-ID:/MATLAB/bs_touchAndLcd/socTouchDisplay_ert_rtw
|
||||
-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
|
||||
-IC:/Program\ Files/MATLAB/R2023b/toolbox/shared/can/src/scanutil
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
|
||||
<slcache.FileAttributes type="slcache.FileAttributes" uuid="50ee8ca7-b352-4bb2-8e74-a29811f62669">
|
||||
<checksum>2oxCrrkWYAfYsid2BKElsqmUm/b9blgB8ROjvTY5kkSHI15WRdu5OidAq6Boxegx/r4DqPRAm5D7oEE/jWVWyQ==</checksum>
|
||||
<slcache.FileAttributes type="slcache.FileAttributes" uuid="9dbe2b40-75ce-4910-952e-94ba17cbac94">
|
||||
<checksum>8bTFSfmqHVlYhNqKtSda3c/Kq/qLr9+hTAYNegrcsTT+6h7F5vQznuwmUe5uezw4aTCxAwaPBDr/BUHto5jDVQ==</checksum>
|
||||
</slcache.FileAttributes>
|
||||
</MF0>
|
||||
Binary file not shown.
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
@ -18,11 +18,9 @@
|
|||
#ifndef socTouchDisplay_COMMON_INCLUDES_
|
||||
#define socTouchDisplay_COMMON_INCLUDES_
|
||||
#include "rtwtypes.h"
|
||||
#include "can_message.h"
|
||||
#endif /* socTouchDisplay_COMMON_INCLUDES_ */
|
||||
|
||||
#include "socTouchDisplay_types.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/* Macros for accessing real-time model data structure */
|
||||
|
|
@ -38,64 +36,7 @@
|
|||
typedef struct {
|
||||
CAN_MESSAGE_BUS Selector; /* '<S3>/Selector' */
|
||||
CAN_MESSAGE_BUS SFunction; /* '<S3>/S-Function' */
|
||||
real_T CANUnpack_o1; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o2; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o3; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o4; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o5; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o6; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o7; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o8; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o9; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o10; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o11; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o12; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o13; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o14; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o15; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o16; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o17; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o18; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o19; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o20; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o21; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o22; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o23; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o24; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o25; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o26; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o27; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o28; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o29; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o30; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o31; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o32; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o33; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o34; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o35; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o36; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o37; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o38; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o39; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o40; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o41; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o42; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o43; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o44; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o45; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o46; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o47; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o48; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o49; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o50; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o51; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o52; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o53; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o54; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o55; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o56; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o57; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o58; /* '<S3>/CAN Unpack' */
|
||||
uint8_T In1[8]; /* '<S5>/In1' */
|
||||
} B_socTouchDisplay_T;
|
||||
|
||||
/* Block states (default storage) for system '<Root>' */
|
||||
|
|
@ -105,8 +46,6 @@ typedef struct {
|
|||
uint32_T temporalCounter_i1; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_1_g; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_2; /* '<Root>/Chart' */
|
||||
int_T CANUnpack_ModeSignalID; /* '<S3>/CAN Unpack' */
|
||||
int_T CANUnpack_StatusPortID; /* '<S3>/CAN Unpack' */
|
||||
uint8_T is_active_c1_socTouchDisplay;/* '<Root>/Chart1' */
|
||||
uint8_T is_c1_socTouchDisplay; /* '<Root>/Chart1' */
|
||||
uint8_T is_active_c3_socTouchDisplay;/* '<Root>/Chart' */
|
||||
|
|
@ -119,6 +58,7 @@ typedef struct {
|
|||
real_T ip_u32TouchDuration_msec; /* '<Root>/ip_u32TouchDuration_msec' */
|
||||
real_T ip_u32DisplayDuration_msec; /* '<Root>/ip_u32DisplayDuration_msec' */
|
||||
CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '<Root>/Input' */
|
||||
uint32_T ip_u32canId; /* '<Root>/ip_u32canId' */
|
||||
} ExtU_socTouchDisplay_T;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
|
|
@ -182,6 +122,7 @@ extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M;
|
|||
* '<S2>' : 'socTouchDisplay/Chart1'
|
||||
* '<S3>' : 'socTouchDisplay/canMsgDecode'
|
||||
* '<S4>' : 'socTouchDisplay/displayData'
|
||||
* '<S5>' : 'socTouchDisplay/canMsgDecode/Enabled Subsystem'
|
||||
*/
|
||||
#endif /* RTW_HEADER_socTouchDisplay_h_ */
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Model version : 1.111
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
* C/C++ source code generated on : Thu Nov 7 22:32:36 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
#include "socTouchDisplay.h"
|
||||
#include "rtwtypes.h"
|
||||
#include <math.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#include "socTouchDisplay_private.h"
|
||||
|
||||
/* Named constants for Chart: '<Root>/Chart' */
|
||||
|
|
@ -48,11 +47,12 @@ RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M = &socTouchDisplay_M_;
|
|||
/* Model step function */
|
||||
void socTouchDisplay_step(void)
|
||||
{
|
||||
real_T tmp;
|
||||
int32_T i;
|
||||
int32_T s3_iter;
|
||||
uint32_T tmp_0;
|
||||
uint32_T tmp;
|
||||
uint8_T rtb_Cast;
|
||||
boolean_T Memory_PreviousInput;
|
||||
boolean_T rtb_Equal;
|
||||
boolean_T rtb_Memory;
|
||||
|
||||
/* Outputs for Iterator SubSystem: '<Root>/canMsgDecode' incorporates:
|
||||
|
|
@ -71,842 +71,38 @@ void socTouchDisplay_step(void)
|
|||
&socTouchDisplay_B.Selector.Length, &socTouchDisplay_B.Selector.Data[0],
|
||||
&socTouchDisplay_B.SFunction);
|
||||
|
||||
/* RelationalOperator: '<S3>/Equal' incorporates:
|
||||
* Inport: '<Root>/ip_u32canId'
|
||||
*/
|
||||
rtb_Equal = (socTouchDisplay_B.SFunction.ID == socTouchDisplay_U.ip_u32canId);
|
||||
|
||||
/* Outputs for Enabled SubSystem: '<S3>/Enabled Subsystem' incorporates:
|
||||
* EnablePort: '<S5>/Enable'
|
||||
*/
|
||||
/* Logic: '<S3>/AND' incorporates:
|
||||
* Constant: '<S3>/Constant'
|
||||
* RelationalOperator: '<S3>/Equal1'
|
||||
*/
|
||||
if ((socTouchDisplay_B.SFunction.Data[0] == 2) && rtb_Equal) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
/* SignalConversion generated from: '<S5>/In1' */
|
||||
socTouchDisplay_B.In1[i] = socTouchDisplay_B.SFunction.Data[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* End of Logic: '<S3>/AND' */
|
||||
/* End of Outputs for SubSystem: '<S3>/Enabled Subsystem' */
|
||||
|
||||
/* DataTypeConversion: '<S3>/Cast' */
|
||||
rtb_Cast = socTouchDisplay_B.In1[2];
|
||||
|
||||
/* Memory: '<S3>/Memory' */
|
||||
rtb_Memory = Memory_PreviousInput;
|
||||
|
||||
/* S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
{
|
||||
/* S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
if ((8 == socTouchDisplay_B.SFunction.Length) &&
|
||||
(socTouchDisplay_B.SFunction.ID != INVALID_CAN_ID) ) {
|
||||
if ((220839530 == socTouchDisplay_B.SFunction.ID) && (1U ==
|
||||
socTouchDisplay_B.SFunction.Extended) ) {
|
||||
{
|
||||
/* --------------- START Unpacking signal 16 ------------------
|
||||
* startBit = 0
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
{
|
||||
real_T outValue = 0;
|
||||
|
||||
{
|
||||
uint8_T unpackedValue = 0;
|
||||
|
||||
{
|
||||
uint8_T tempValue = (uint8_T) (0);
|
||||
|
||||
{
|
||||
tempValue = tempValue | (uint8_T)
|
||||
(socTouchDisplay_B.SFunction.Data[0]);
|
||||
}
|
||||
|
||||
unpackedValue = tempValue;
|
||||
}
|
||||
|
||||
outValue = (real_T) (unpackedValue);
|
||||
}
|
||||
|
||||
{
|
||||
real_T result = (real_T) outValue;
|
||||
socTouchDisplay_B.CANUnpack_o17 = result;
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------- START Unpacking signal 0 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 1 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 2 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 3 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 4 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 5 ------------------
|
||||
* startBit = 56
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 6 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 7 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 8 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 9 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 10 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 11 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 12 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 13 ------------------
|
||||
* startBit = 56
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 14 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 15 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 17 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 18 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 19 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 20 ------------------
|
||||
* startBit = 48
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 21 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 22 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 23 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 24 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 25 ------------------
|
||||
* startBit = 24
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 26 ------------------
|
||||
* startBit = 32
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 27 ------------------
|
||||
* startBit = 40
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 28 ------------------
|
||||
* startBit = 8
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 29 ------------------
|
||||
* startBit = 9
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 30 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 31 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 32 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 33 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 34 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 35 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 36 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 37 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 38 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 39 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 40 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 41 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 42 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 43 ------------------
|
||||
* startBit = 16
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 44 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 45 ------------------
|
||||
* startBit = 48
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 46 ------------------
|
||||
* startBit = 32
|
||||
* length = 16
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 47 ------------------
|
||||
* startBit = 9
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 48 ------------------
|
||||
* startBit = 8
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 49 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = SIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 50 ------------------
|
||||
* startBit = 10
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 51 ------------------
|
||||
* startBit = 11
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 52 ------------------
|
||||
* startBit = 13
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 53 ------------------
|
||||
* startBit = 14
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 54 ------------------
|
||||
* startBit = 15
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 55 ------------------
|
||||
* startBit = 16
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/* Perform the mode dependency check to value */
|
||||
if (socTouchDisplay_B.CANUnpack_o17 == 2.0) {
|
||||
{
|
||||
real_T outValue = 0;
|
||||
|
||||
{
|
||||
uint8_T unpackedValue = 0;
|
||||
|
||||
{
|
||||
uint8_T tempValue = (uint8_T) (0);
|
||||
|
||||
{
|
||||
tempValue = tempValue | (uint8_T)
|
||||
(socTouchDisplay_B.SFunction.Data[2]);
|
||||
}
|
||||
|
||||
unpackedValue = tempValue;
|
||||
}
|
||||
|
||||
outValue = (real_T) (unpackedValue);
|
||||
}
|
||||
|
||||
{
|
||||
real_T result = (real_T) outValue;
|
||||
socTouchDisplay_B.CANUnpack_o56 = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------- START Unpacking signal 56 ------------------
|
||||
* startBit = 8
|
||||
* length = 8
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
|
||||
/* --------------- START Unpacking signal 57 ------------------
|
||||
* startBit = 12
|
||||
* length = 1
|
||||
* desiredSignalByteLayout = BIGENDIAN
|
||||
* dataType = UNSIGNED
|
||||
* factor = 1.0
|
||||
* offset = 0.0
|
||||
* -----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Signal is not connected or connected to terminator.
|
||||
* No unpacking code generated.
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* DataTypeConversion: '<S3>/Cast' */
|
||||
tmp = floor(socTouchDisplay_B.CANUnpack_o56);
|
||||
if (rtIsNaN(tmp) || rtIsInf(tmp)) {
|
||||
tmp = 0.0;
|
||||
} else {
|
||||
tmp = fmod(tmp, 256.0);
|
||||
}
|
||||
|
||||
if (tmp < 0.0) {
|
||||
rtb_Cast = (uint8_T)-(int8_T)(uint8_T)-tmp;
|
||||
} else {
|
||||
rtb_Cast = (uint8_T)tmp;
|
||||
}
|
||||
|
||||
/* End of DataTypeConversion: '<S3>/Cast' */
|
||||
|
||||
/* Update for Memory: '<S3>/Memory' incorporates:
|
||||
* Logic: '<S3>/OR'
|
||||
* RelationalOperator: '<S3>/Equal'
|
||||
*/
|
||||
Memory_PreviousInput = ((socTouchDisplay_B.SFunction.ID == 220839530U) ||
|
||||
Memory_PreviousInput);
|
||||
Memory_PreviousInput = (rtb_Equal || Memory_PreviousInput);
|
||||
}
|
||||
|
||||
/* End of Outputs for SubSystem: '<Root>/canMsgDecode' */
|
||||
|
|
@ -1012,9 +208,9 @@ void socTouchDisplay_step(void)
|
|||
socTouchDisplay_DW.durationCounter_2 = 0U;
|
||||
}
|
||||
|
||||
tmp_0 = (uint32_T)ceil(socTouchDisplay_U.ip_u32TouchDuration_msec);
|
||||
if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_2 * 100) >
|
||||
tmp_0) && Memory_PreviousInput) {
|
||||
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;
|
||||
|
||||
|
|
@ -1026,7 +222,7 @@ void socTouchDisplay_step(void)
|
|||
}
|
||||
|
||||
if (((uint32_T)((int32_T)socTouchDisplay_DW.durationCounter_1_g * 100) >
|
||||
tmp_0) && (!Memory_PreviousInput)) {
|
||||
tmp) && (!Memory_PreviousInput)) {
|
||||
socTouchDisplay_DW.temporalCounter_i1 = 0U;
|
||||
socTouchDisplay_DW.is_c3_socTouchDisplay =
|
||||
socTouchDisplay_IN_displayError;
|
||||
|
|
@ -1114,18 +310,7 @@ void socTouchDisplay_step(void)
|
|||
/* Model initialize function */
|
||||
void socTouchDisplay_initialize(void)
|
||||
{
|
||||
/* Registration code */
|
||||
|
||||
/* initialize non-finites */
|
||||
rt_InitInfAndNaN(sizeof(real_T));
|
||||
|
||||
/* SystemInitialize for Iterator SubSystem: '<Root>/canMsgDecode' */
|
||||
|
||||
/* Start for S-Function (scanunpack): '<S3>/CAN Unpack' */
|
||||
|
||||
/*-----------S-Function Block: <S3>/CAN Unpack -----------------*/
|
||||
|
||||
/* End of SystemInitialize for SubSystem: '<Root>/canMsgDecode' */
|
||||
/* (no initialization code required) */
|
||||
}
|
||||
|
||||
/* Model terminate function */
|
||||
|
|
|
|||
|
|
@ -67,4 +67,4 @@ IVEC_EcuCommonErr_e xECU_CANDeInit(MCAN_Regs* MCAN);
|
|||
IVEC_EcuCommonErr_e xECU_WriteDataOverCAN(uint8_t* pucBuf, uint32_t ulId, int retCode, uint32_t BufNum);
|
||||
IVEC_EcuCommonErr_e xECU_CANGetData(can_buff_t *xBuff);
|
||||
IVEC_EcuCommonErr_e xECU_CanReInit(MCAN_Regs* MCAN,uint16_t speed);
|
||||
|
||||
IVEC_EcuCommonErr_e xECU_GetCanStatus(MCAN_Regs* MCAN, uint16_t speed);
|
||||
|
|
|
|||
|
|
@ -28,49 +28,18 @@ IVEC_EcuCommonErr_e xECU_WriteDataOverCAN(uint8_t* pucBuf, uint32_t ulId, int re
|
|||
{
|
||||
IVEC_EcuCommonErr_e l_xFuncStatus = commonECU_WRITE_FAIL;
|
||||
uint8_t l_i32Ret;
|
||||
// if ( (retCode >= 0) && (ulId > 0x00) && (ulId < 0xffffffff) )
|
||||
// {
|
||||
DL_MCAN_TxBufElement xFrame = {0};
|
||||
|
||||
|
||||
xFrame.dlc = (uint8_t)retCode;
|
||||
xFrame.xtd = (ulId > 0x7ff) ? 1U : 0U;
|
||||
if(xFrame.xtd == 0)
|
||||
{
|
||||
xFrame.id = ulId << 18U; //txMsg.id = ((uint32_t)(0x9)) << 18U;
|
||||
}
|
||||
else
|
||||
xFrame.id = ulId; //txMsg.id = ((uint32_t)(0x9)) << 18U;
|
||||
|
||||
xFrame.rtr = 0U;
|
||||
/* ESI bit in CAN FD format depends only on error passive flag. */
|
||||
xFrame.esi = 0U;
|
||||
/* CAN FD frames transmitted with bit rate switching. */
|
||||
xFrame.brs = 0U;
|
||||
/* Frame transmitted in CAN FD format. */
|
||||
xFrame.fdf = 0U;
|
||||
/* Store Tx events. */
|
||||
xFrame.efc = 1U;
|
||||
/* Message Marker. */
|
||||
xFrame.mm = 0xAAU;
|
||||
|
||||
uint16_t TxData[DL_MCAN_MAX_PAYLOAD_BYTES]; // Define a buffer for the CAN payload data
|
||||
uint16_t TxData[8] = {0}; // Define a buffer for the CAN payload data
|
||||
for (int i = 0; i < retCode; i++) {
|
||||
TxData[i] = pucBuf[PKT_HEADER + i]^0x0000;
|
||||
TxData[i] = (uint16_t)(pucBuf[i] ^ 0x0000);
|
||||
}
|
||||
|
||||
|
||||
int Bytes = retCode;
|
||||
//MCAL_MCANTx(MCAN_Regs *MCAN, uint32_t u32ID ,uint16_t *TxData, uint32_t BufNum, uint32_t Bytes)
|
||||
l_i32Ret = xMCAL_MCANTx(CANFD0, ulId, TxData, BufNum, Bytes);
|
||||
if(l_i32Ret == IVEC_MCAL_STATUS_SUCCESS)
|
||||
{
|
||||
l_xFuncStatus = commonECU_SUCCESS;
|
||||
}
|
||||
|
||||
//}
|
||||
return l_xFuncStatus;
|
||||
|
||||
}
|
||||
|
||||
IVEC_EcuCommonErr_e xECU_CANGetData(can_buff_t *pxBuff)
|
||||
|
|
@ -128,3 +97,9 @@ IVEC_EcuCommonErr_e xECU_CANDeInit(MCAN_Regs* MCAN)
|
|||
return l_xFuncStatus;
|
||||
}
|
||||
|
||||
IVEC_EcuCommonErr_e xECU_GetCanStatus(MCAN_Regs* MCAN, uint16_t speed)
|
||||
{
|
||||
char l_ucErrorString[32] = {0};
|
||||
if( xMCAL_getMCAN_ErrorStatus(&l_ucErrorString) == IVEC_MCAL_STATUS_ERROR )
|
||||
xECU_CanReInit(MCAN, speed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
//#include "ivec_mcal_uart.h"
|
||||
|
||||
#define LOG_STRING "ivec-ecu-UART"
|
||||
#define CAN_UART_BUFFER_MAX_SIZE 2048
|
||||
#define DATA_PACKET_TIMEOUT 100
|
||||
#define CAN_UART_BUFFER_MAX_SIZE 4096
|
||||
#define DATA_PACKET_TIMEOUT 1
|
||||
|
||||
CmplxFifoQueueHandle_s __gprv_MyEcuUARTResponseQueue = { 0 };
|
||||
|
||||
|
|
@ -157,16 +157,15 @@ IVEC_EcuCommonErr_e xECU_UARTGetData(McalUartHandle_s *prvUartHandle, uint8_t* p
|
|||
goto exit;
|
||||
}
|
||||
|
||||
int length = 2;
|
||||
uint8_t ijk = 0;
|
||||
|
||||
int l_u32Len = 0;
|
||||
uint32_t u32CommTimestamp = i32MCAL_getTicks();
|
||||
|
||||
while(((i32MCAL_getTicks()-u32CommTimestamp) <= timeout+1) && (ijk < len))
|
||||
{
|
||||
|
||||
if(!u8CMPLX_FifoQueueEmpty(&__gprv_MyEcuUARTResponseQueue)){
|
||||
if( u8CMPLX_FifoDequeue(&__gprv_MyEcuUARTResponseQueue, &pucBuffer[ijk], &length, 0) == 1 )
|
||||
if( u8CMPLX_FifoDequeue(&__gprv_MyEcuUARTResponseQueue, &pucBuffer[ijk], &l_u32Len, 0) == 1 )
|
||||
ijk++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
McalUartHandle_s g_xUartHandle;
|
||||
uint32_t g_u32UartSpeed = 0;
|
||||
xCAN_baud_t g_u16CanSpeed = 0;
|
||||
uint8_t g_pu8Buf[MAX_PACKET_LENGTH] = {0};
|
||||
volatile uint32_t g_u32CanId = 0x1fffffff;
|
||||
|
||||
#define MAX_FILTERS 10
|
||||
uint32_t maskValues[MAX_FILTERS];
|
||||
|
|
@ -30,6 +32,7 @@ uint16_t extendedFilter = 0;
|
|||
uint16_t standardFilter = 0;
|
||||
|
||||
static uint8_t __gprv_u8Idx = 0;
|
||||
static uint8_t __gprv_u8Buf = 0;
|
||||
|
||||
extern ExtU_socTouchDisplay_T socTouchDisplay_U;
|
||||
extern ExtY_socTouchDisplay_T socTouchDisplay_Y;
|
||||
|
|
@ -171,6 +174,7 @@ void vRTE_MatlabRun(void)
|
|||
socTouchDisplay_U.in_bTouchDetected = (u32MCAL_gpioRead(GPIOB, DL_GPIO_PIN_17) == DL_GPIO_PIN_17) ? 1 : 0;
|
||||
socTouchDisplay_U.ip_u32DisplayDuration_msec = 2000;
|
||||
socTouchDisplay_U.ip_u32TouchDuration_msec = 100;
|
||||
socTouchDisplay_U.ip_u32canId = g_u32CanId;
|
||||
|
||||
socTouchDisplay_step();
|
||||
|
||||
|
|
@ -184,9 +188,23 @@ void vRTE_MatlabRun(void)
|
|||
tm1650_showDot(TM_1650_DIG_2,false);
|
||||
tm1650_showDot(TM_1650_DIG_3,false);
|
||||
|
||||
if( socTouchDisplay_Y.op_u8HundredsPlace == 1 && \
|
||||
socTouchDisplay_Y.op_u8TensPlace == 0 && \
|
||||
socTouchDisplay_Y.op_u8OnesPlace == 0)
|
||||
{
|
||||
char l_cData = 'F';
|
||||
tm1650_showAlphabet(TM_1650_DIG_2, (char*)&l_cData);
|
||||
l_cData = 'C';
|
||||
tm1650_showAlphabet(TM_1650_DIG_3, (char*)&l_cData);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
tm1650_showNum(TM_1650_DIG_3, socTouchDisplay_Y.op_u8OnesPlace);
|
||||
tm1650_showNum(TM_1650_DIG_2, socTouchDisplay_Y.op_u8TensPlace);
|
||||
tm1650_showNum(TM_1650_DIG_1, socTouchDisplay_Y.op_u8HundredsPlace);
|
||||
}
|
||||
// tm1650_showNum(TM_1650_DIG_1, socTouchDisplay_Y.op_u8HundredsPlace);
|
||||
|
||||
}
|
||||
if( socTouchDisplay_Y.op_bErrorStatus )
|
||||
{
|
||||
|
|
@ -205,7 +223,6 @@ void vRTE_MatlabRun(void)
|
|||
{
|
||||
tm1650_displaySwitch(TM_1650_Screen_OFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vRTE_InitUARTCANEcho(void)
|
||||
|
|
@ -354,18 +371,18 @@ void vCanConfigFilter() {
|
|||
void vRTE_UARTDataProcess(void)
|
||||
{
|
||||
PacketRetCode_t retCode = PACKET_FAIL;
|
||||
uint8_t pucBuf[MAX_PACKET_LENGTH] = {0};
|
||||
uint32_t ulId = 0xffffffff;
|
||||
uint32_t ulId = 0x1fffffff;
|
||||
|
||||
retCode= xECU_ReadCANDataOverUART(&g_xUartHandle,pucBuf,&ulId);
|
||||
retCode= xECU_ReadCANDataOverUART(&g_xUartHandle,g_pu8Buf,&ulId);
|
||||
ulId &= 0x1fffffff;
|
||||
if(retCode > -1)
|
||||
{
|
||||
if(retCode > 0 && ulId == 0x00)
|
||||
{
|
||||
uint32_t baudrate = 0;
|
||||
uint8_t mode = pucBuf[PKT_HEADER];
|
||||
memcpy(&baudrate, &pucBuf[PKT_HEADER+1], (uint32_t)retCode);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x01, pucBuf, 0);
|
||||
uint8_t mode = g_pu8Buf[PKT_HEADER];
|
||||
memcpy(&baudrate, &g_pu8Buf[PKT_HEADER+1], (uint32_t)retCode);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x01, g_pu8Buf, 0);
|
||||
if( mode == 0 )
|
||||
{
|
||||
g_u32UartSpeed = baudrate;
|
||||
|
|
@ -408,32 +425,46 @@ void vRTE_UARTDataProcess(void)
|
|||
isExtended = (maskId > 0x7FF); // Standard IDs are <= 0x7FF
|
||||
vCanFilterMaskSaveVal((pucBuf[PKT_HEADER+1] - 1), maskId, isExtended);
|
||||
}
|
||||
else if (mode == 100)
|
||||
{
|
||||
g_u32CanId = baudrate;
|
||||
return;
|
||||
}
|
||||
|
||||
vMCAL_DelayTicks(100);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x01, pucBuf, 0);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x01, g_pu8Buf, 0);
|
||||
}
|
||||
if ( retCode == 0 && ulId == 0){
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x0, pucBuf, 0);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x0, g_pu8Buf, 0);
|
||||
}
|
||||
if ( retCode >= 0 && ulId > 0x00 && ulId < 0xffffffff )
|
||||
if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) )
|
||||
{
|
||||
xECU_WriteDataOverCAN(pucBuf, ulId, retCode, 0);
|
||||
__gprv_u8Buf = (__gprv_u8Buf + 1) % 3;
|
||||
xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vRTE_CANDataProcess(void)
|
||||
{
|
||||
IVEC_EcuCommonErr_e retCode = commonECU_FAIL;
|
||||
can_buff_t xBuff = { 0x00 };
|
||||
|
||||
|
||||
retCode = xECU_CANGetData(&xBuff);
|
||||
if(retCode == commonECU_SUCCESS)
|
||||
volatile uint8_t l_u8TxBurstMessages = 0;
|
||||
while( xECU_CANGetData(&xBuff) == commonECU_SUCCESS )
|
||||
{
|
||||
if( (xBuff.id == 0x16) && (xBuff.data[0] = 'V') && \
|
||||
(xBuff.data[1] == 'E') && (xBuff.data[2] == 'C'))
|
||||
{
|
||||
xMCAL_SoftReset();
|
||||
}
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, (uint32_t)xBuff.id, (uint8_t*)&xBuff.data[0], (uint8_t)xBuff.length);
|
||||
socTouchDisplay_U.Input[__gprv_u8Idx].ID = xBuff.id;
|
||||
socTouchDisplay_U.Input[__gprv_u8Idx].Length = xBuff.length;
|
||||
memcpy(&socTouchDisplay_U.Input[__gprv_u8Idx].Data[0], &xBuff.data[0], 8);
|
||||
__gprv_u8Idx = (__gprv_u8Idx + 1) % MAX_CAN_MESSAGE_INSTANCE;
|
||||
if(l_u8TxBurstMessages < 16)
|
||||
l_u8TxBurstMessages++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
xECU_GetCanStatus(CANFD0, g_u16CanSpeed);
|
||||
}
|
||||
|
|
|
|||
11
main.c
11
main.c
|
|
@ -5,7 +5,7 @@
|
|||
* @ Remove (_N) from the end of definition to define
|
||||
* @ Content added by AS - MCAL function for ADC, ADC with DMA, Periodic Timer, PWM, SysTick and Input Capture
|
||||
*/
|
||||
|
||||
#include "ti_msp_dl_config.h"
|
||||
#include "../utils/utils.h"
|
||||
#include "../Core/Include/gpio.h"
|
||||
#include "../Core/Include/ivec_mcal_adc_dma.h"
|
||||
|
|
@ -14,12 +14,9 @@
|
|||
#include "../Core/Include/ivec_mcal_spi.h"
|
||||
#include "../Core/Include/ivec_mcal_i2c.h"
|
||||
#include "../Core/Include/ivec_mcal_uart.h"
|
||||
#include "ti_msp_dl_config.h"
|
||||
#include "string.h"
|
||||
#include "ivec_rte.h"
|
||||
|
||||
|
||||
|
||||
void vMCAL_TimerCallback(void)
|
||||
{
|
||||
//vRTE_MatlabRun();
|
||||
|
|
@ -35,12 +32,12 @@ static void __prv_TimerConfig(void)
|
|||
NVIC_EnableIRQ(TIMA0_INT_IRQn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
__enable_irq();
|
||||
volatile DL_SYSCTL_RESET_CAUSE l_xResetCause = DL_SYSCTL_getResetCause();
|
||||
xMCAL_McuInit();
|
||||
xMCAL_SYSCTL_INIT(HFXT,SLEEP0);
|
||||
xMCAL_SYSCTL_INIT(HFXT,STANDBY0);
|
||||
xMCAL_SYSTICK_INIT(Period_1ms);
|
||||
__prv_TimerConfig();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,169 @@
|
|||
/*Entry Point
|
||||
ENTRY(Reset_Handler)
|
||||
/* Generate a link error if heap and stack don't fit into RAM */
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x000012E8; /* required amount of stack */
|
||||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (RX) : ORIGIN = 0x00008000, LENGTH = 0x00018000
|
||||
SRAM (RWX) : ORIGIN = 0x20200000, LENGTH = 0x00008000
|
||||
BCR_CONFIG (R) : ORIGIN = 0x41C00000, LENGTH = 0x00000080
|
||||
BSL_CONFIG (R) : ORIGIN = 0x41C00100, LENGTH = 0x00000080
|
||||
}
|
||||
|
||||
/* Note: SRAM length must match MPPC/MEMSS config! Please edit it manually. */
|
||||
|
||||
REGION_ALIAS("REGION_TEXT", FLASH);
|
||||
REGION_ALIAS("REGION_PREINIT_ARRAY", FLASH);
|
||||
REGION_ALIAS("REGION_INIT_ARRAY", FLASH);
|
||||
REGION_ALIAS("REGION_FINI_ARRAY", FLASH);
|
||||
REGION_ALIAS("REGION_BSS", SRAM);
|
||||
REGION_ALIAS("REGION_NOINIT", SRAM);
|
||||
REGION_ALIAS("REGION_DATA", SRAM);
|
||||
REGION_ALIAS("REGION_STACK", SRAM);
|
||||
REGION_ALIAS("REGION_HEAP", SRAM);
|
||||
REGION_ALIAS("REGION_TEXT_RAM", SRAM);
|
||||
REGION_ALIAS("REGION_ARM_EXIDX", FLASH);
|
||||
REGION_ALIAS("REGION_ARM_EXTAB", FLASH);
|
||||
|
||||
/* Define output sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* section for the interrupt vector area */
|
||||
PROVIDE (_intvecs_base_address =
|
||||
DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x00008000);
|
||||
|
||||
.intvecs (_intvecs_base_address) : AT (_intvecs_base_address) {
|
||||
KEEP (*(.intvecs))
|
||||
} > REGION_TEXT
|
||||
|
||||
PROVIDE (_vtable_base_address =
|
||||
DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20200000);
|
||||
|
||||
.vtable (_vtable_base_address) (NOLOAD) : AT (_vtable_base_address) {
|
||||
KEEP (*(.vtable))
|
||||
} > REGION_DATA
|
||||
|
||||
.text : {
|
||||
CREATE_OBJECT_SYMBOLS
|
||||
KEEP (*(.text))
|
||||
. = ALIGN(0x8);
|
||||
*(.text.*)
|
||||
. = ALIGN(0x8);
|
||||
KEEP (*(.ctors))
|
||||
. = ALIGN(0x8);
|
||||
KEEP (*(.dtors))
|
||||
. = ALIGN(0x8);
|
||||
KEEP (*(.init))
|
||||
. = ALIGN(0x8);
|
||||
KEEP (*(.fini*))
|
||||
. = ALIGN(0x8);
|
||||
} > REGION_TEXT AT> REGION_TEXT
|
||||
|
||||
.ramfunc : {
|
||||
__ramfunct_load__ = LOADADDR (.ramfunc);
|
||||
__ramfunct_start__ = .;
|
||||
*(.ramfunc)
|
||||
. = ALIGN(0x8);
|
||||
__ramfunct_end__ = .;
|
||||
} > REGION_TEXT_RAM AT> REGION_TEXT
|
||||
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
. = ALIGN(0x8);
|
||||
*(.rodata.*)
|
||||
. = ALIGN(0x8);
|
||||
} > REGION_TEXT AT> REGION_TEXT
|
||||
|
||||
.preinit_array : {
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*));
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
} > REGION_PREINIT_ARRAY AT> REGION_TEXT
|
||||
|
||||
.init_array : {
|
||||
. = ALIGN(0x8);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
} > REGION_INIT_ARRAY AT> REGION_TEXT
|
||||
|
||||
.fini_array : {
|
||||
. = ALIGN(0x8);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(0x8);
|
||||
} > REGION_FINI_ARRAY AT> REGION_TEXT
|
||||
|
||||
.ARM.exidx : {
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
__exidx_end = .;
|
||||
} > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(0x8);
|
||||
KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*))
|
||||
. = ALIGN(0x8);
|
||||
} > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB
|
||||
|
||||
__etext = .;
|
||||
|
||||
.data : {
|
||||
__data_load__ = LOADADDR (.data);
|
||||
__data_start__ = .;
|
||||
KEEP (*(.data))
|
||||
KEEP (*(.data*))
|
||||
. = ALIGN (8);
|
||||
__data_end__ = .;
|
||||
} > REGION_DATA AT> REGION_TEXT
|
||||
|
||||
.bss : {
|
||||
__bss_start__ = .;
|
||||
*(.shbss)
|
||||
KEEP (*(.bss))
|
||||
*(.bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN (8);
|
||||
__bss_end__ = .;
|
||||
} > REGION_BSS AT> REGION_BSS
|
||||
|
||||
.noinit : {
|
||||
/* place all symbols in input sections that start with .noinit */
|
||||
KEEP(*(*.noinit*))
|
||||
. = ALIGN (8);
|
||||
} > REGION_NOINIT AT> REGION_NOINIT
|
||||
|
||||
.heap : {
|
||||
__heap_start__ = .;
|
||||
end = __heap_start__;
|
||||
_end = end;
|
||||
__end = end;
|
||||
KEEP (*(.heap))
|
||||
__heap_end__ = .;
|
||||
__HeapLimit = __heap_end__;
|
||||
} > REGION_HEAP AT> REGION_HEAP
|
||||
|
||||
.stack (NOLOAD) : ALIGN(0x8) {
|
||||
_stack = .;
|
||||
KEEP(*(.stack))
|
||||
} > REGION_STACK AT> REGION_STACK
|
||||
|
||||
.BCRConfig :
|
||||
{
|
||||
KEEP(*(.BCRConfig))
|
||||
} > BCR_CONFIG
|
||||
|
||||
.BSLConfig :
|
||||
{
|
||||
KEEP(*(.BSLConfig))
|
||||
} > BSL_CONFIG
|
||||
|
||||
__StackTop = ORIGIN(REGION_STACK) + LENGTH(REGION_STACK);
|
||||
PROVIDE(__stack = __StackTop);
|
||||
}
|
||||
|
|
@ -45,6 +45,7 @@ pinFunction4.HFCLKMonitor = true;
|
|||
pinFunction4.enable = true;
|
||||
|
||||
CAPTURE1.$name = "CAPTURE_0";
|
||||
CAPTURE1.timerClkPrescale = 2;
|
||||
CAPTURE1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
||||
|
||||
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
||||
|
|
@ -99,6 +100,7 @@ UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
|
|||
UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
||||
|
||||
ProjectConfig.deviceSpin = "MSPM0G3507";
|
||||
ProjectConfig.genLinker = false;
|
||||
|
||||
/**
|
||||
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||
|
|
|
|||
|
|
@ -0,0 +1,222 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Entry point for the application. */
|
||||
extern void SystemInit(void);
|
||||
extern int main( void );
|
||||
|
||||
extern uint32_t __data_load__;
|
||||
extern uint32_t __data_start__;
|
||||
extern uint32_t __data_end__;
|
||||
extern uint32_t __ramfunct_load__;
|
||||
extern uint32_t __ramfunct_start__;
|
||||
extern uint32_t __ramfunct_end__;
|
||||
extern uint32_t __bss_start__;
|
||||
extern uint32_t __bss_end__;
|
||||
extern uint32_t __StackTop;
|
||||
|
||||
typedef void( *pFunc )( void );
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
void Default_Handler(void);
|
||||
extern void Reset_Handler (void) __attribute__((weak));
|
||||
extern void __libc_init_array(void);
|
||||
extern void _init (void) __attribute__((weak, alias("initStub")));
|
||||
void initStub(void){;}
|
||||
|
||||
/* Processor Exceptions */
|
||||
extern void NMI_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void HardFault_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SVC_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void PendSV_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SysTick_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
/* Device Specific Interrupt Handlers */
|
||||
extern void GROUP0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void GROUP1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG8_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART3_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void CANFD0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DAC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART2_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG6_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG7_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG12_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void AES_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void RTC_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DMA_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
|
||||
/* Interrupt vector table. Note that the proper constructs must be placed on this to */
|
||||
/* ensure that it ends up at physical address 0x0000.0000 or at the start of */
|
||||
/* the program if located at a start address other than 0. */
|
||||
void (* const interruptVectors[])(void) __attribute__ ((used)) __attribute__ ((section (".intvecs"))) =
|
||||
{
|
||||
(pFunc)&__StackTop, /* The initial stack pointer */
|
||||
Reset_Handler, /* The reset handler */
|
||||
NMI_Handler, /* The NMI handler */
|
||||
HardFault_Handler, /* The hard fault handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
SVC_Handler, /* SVCall handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
PendSV_Handler, /* The PendSV handler */
|
||||
SysTick_Handler, /* SysTick handler */
|
||||
GROUP0_IRQHandler, /* GROUP0 interrupt handler */
|
||||
GROUP1_IRQHandler, /* GROUP1 interrupt handler */
|
||||
TIMG8_IRQHandler, /* TIMG8 interrupt handler */
|
||||
UART3_IRQHandler, /* UART3 interrupt handler */
|
||||
ADC0_IRQHandler, /* ADC0 interrupt handler */
|
||||
ADC1_IRQHandler, /* ADC1 interrupt handler */
|
||||
CANFD0_IRQHandler, /* CANFD0 interrupt handler */
|
||||
DAC0_IRQHandler, /* DAC0 interrupt handler */
|
||||
0, /* Reserved */
|
||||
SPI0_IRQHandler, /* SPI0 interrupt handler */
|
||||
SPI1_IRQHandler, /* SPI1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
UART1_IRQHandler, /* UART1 interrupt handler */
|
||||
UART2_IRQHandler, /* UART2 interrupt handler */
|
||||
UART0_IRQHandler, /* UART0 interrupt handler */
|
||||
TIMG0_IRQHandler, /* TIMG0 interrupt handler */
|
||||
TIMG6_IRQHandler, /* TIMG6 interrupt handler */
|
||||
TIMA0_IRQHandler, /* TIMA0 interrupt handler */
|
||||
TIMA1_IRQHandler, /* TIMA1 interrupt handler */
|
||||
TIMG7_IRQHandler, /* TIMG7 interrupt handler */
|
||||
TIMG12_IRQHandler, /* TIMG12 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
I2C0_IRQHandler, /* I2C0 interrupt handler */
|
||||
I2C1_IRQHandler, /* I2C1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
AES_IRQHandler, /* AES interrupt handler */
|
||||
0, /* Reserved */
|
||||
RTC_IRQHandler, /* RTC interrupt handler */
|
||||
DMA_IRQHandler, /* DMA interrupt handler */
|
||||
|
||||
};
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
/* This is the code that gets called when the processor first starts execution */
|
||||
/* following a reset event. Only the absolutely necessary set is performed, */
|
||||
/* after which the application supplied entry() routine is called. Any fancy */
|
||||
/* actions (such as making decisions based on the reset cause register, and */
|
||||
/* resetting the bits in that register) are left solely in the hands of the */
|
||||
/* application. */
|
||||
void Reset_Handler(void)
|
||||
{
|
||||
uint32_t *pui32Src, *pui32Dest;
|
||||
uint32_t *bs, *be;
|
||||
|
||||
//
|
||||
// Copy the data segment initializers from flash to SRAM.
|
||||
//
|
||||
pui32Src = &__data_load__;
|
||||
for(pui32Dest = &__data_start__; pui32Dest < &__data_end__; )
|
||||
{
|
||||
*pui32Dest++ = *pui32Src++;
|
||||
}
|
||||
|
||||
//
|
||||
// Copy the ramfunct segment initializers from flash to SRAM.
|
||||
//
|
||||
pui32Src = &__ramfunct_load__;
|
||||
for(pui32Dest = &__ramfunct_start__; pui32Dest < &__ramfunct_end__; )
|
||||
{
|
||||
*pui32Dest++ = *pui32Src++;
|
||||
}
|
||||
|
||||
// Initialize .bss to zero
|
||||
bs = &__bss_start__;
|
||||
be = &__bss_end__;
|
||||
while (bs < be)
|
||||
{
|
||||
*bs = 0;
|
||||
bs++;
|
||||
}
|
||||
|
||||
/*
|
||||
* System initialization routine can be called here, but it's not
|
||||
* required for MSPM0.
|
||||
*/
|
||||
// SystemInit();
|
||||
|
||||
//
|
||||
// Initialize virtual tables, along executing init, init_array, constructors
|
||||
// and preinit_array functions
|
||||
//
|
||||
__libc_init_array();
|
||||
|
||||
//
|
||||
// Call the application's entry point.
|
||||
//
|
||||
|
||||
main();
|
||||
|
||||
//
|
||||
// If we ever return signal Error
|
||||
//
|
||||
HardFault_Handler();
|
||||
}
|
||||
|
||||
/* This is the code that gets called when the processor receives an unexpected */
|
||||
/* interrupt. This simply enters an infinite loop, preserving the system state */
|
||||
/* for examination by a debugger. */
|
||||
void Default_Handler(void)
|
||||
{
|
||||
/* Enter an infinite loop. */
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ static const DL_SYSCTL_SYSPLLConfig gSYSPLLConfig = {
|
|||
.enableCLK0 = DL_SYSCTL_SYSPLL_CLK0_ENABLE,
|
||||
.sysPLLMCLK = DL_SYSCTL_SYSPLL_MCLK_CLK0,
|
||||
.sysPLLRef = DL_SYSCTL_SYSPLL_REF_HFCLK,
|
||||
.qDiv = 1,
|
||||
.qDiv = 3,
|
||||
.pDiv = DL_SYSCTL_SYSPLL_PDIV_1
|
||||
};
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ xCoreStatus_t xMCAL_SYSCTL_INIT(uint8_t u8CLK_SRC,uint8_t u8LP_MODE)
|
|||
DL_SYSCTL_disableSYSPLL();
|
||||
DL_SYSCTL_setHFCLKSourceHFXTParams(DL_SYSCTL_HFXT_RANGE_16_32_MHZ,10, true);
|
||||
DL_SYSCTL_configSYSPLL((DL_SYSCTL_SYSPLLConfig *) &gSYSPLLConfig);
|
||||
DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1);
|
||||
DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_2);
|
||||
DL_SYSCTL_setMCLKSource(SYSOSC, HSCLK, DL_SYSCTL_HSCLK_SOURCE_SYSPLL);
|
||||
}
|
||||
else if(u8CLK_SRC==SYSOSC)
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
/*SysTick Period Options*/
|
||||
Period_1ms = 24000, /*!< sets period of SysTick to 1ms */
|
||||
Period_1ms = 48000, /*!< sets period of SysTick to 1ms @48Mhz*/
|
||||
}xTicks_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
|||
Loading…
Reference in New Issue