/*
 * File: TouchBoard_X_handle_10ms.c
 *
 * Code generated for Simulink model 'P417_SWTR_App'.
 *
 * Model version                  : 1.165
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Sun Jun 25 21:59:14 2023
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "TouchBoard_X_handle_10ms.h"

/* Include model header file for global data */
#include "P417_SWTR_App.h"
#include "P417_SWTR_App_private.h"

/* System initialize for function-call system: '<S2>/TouchBoard_X_handle_10ms' */
void P_TouchBoard_X_handle_10ms_Init(B_TouchBoard_X_handle_10ms_P4_T *localB)
{
  /* SystemInitialize for Atomic SubSystem: '<S27>/Subsystem_selX' */
  P417_SWTR_A_Subsystem_selX_Init(&localB->Slect);

  /* End of SystemInitialize for SubSystem: '<S27>/Subsystem_selX' */
}

/* Output and update for function-call system: '<S2>/TouchBoard_X_handle_10ms' */
void P417_S_TouchBoard_X_handle_10ms(uint8_T rtu_Board_XY_Trigg_afhd_in, uint8_T
  rtu_Voice_Trigg_afhd_in, uint8_T rtu_Vol_Trigg_afhd_in, uint8_T
  rtu_Menu_Trigg_afhd_in, uint8_T rtu_Up_Trigg_afhd_in, uint8_T
  rtu_Down_Trigg_afhd_in, uint8_T rtu_Left_Trigg_afhd_in, uint8_T
  rtu_Right_Trigg_afhd_in, uint8_T rtu_Center_Trigg_afhd_in,
  B_TouchBoard_X_handle_10ms_P4_T *localB)
{
  /* Outputs for Atomic SubSystem: '<S27>/Subsystem_selX' */

  /* RelationalOperator: '<S54>/Compare' incorporates:
   *  Constant: '<S51>/Constant'
   *  Constant: '<S52>/Constant'
   *  Constant: '<S53>/Constant'
   *  Constant: '<S54>/Constant'
   *  Constant: '<S55>/Constant'
   *  Constant: '<S56>/Constant'
   *  Constant: '<S57>/Constant'
   *  Constant: '<S58>/Constant'
   *  Constant: '<S59>/Constant'
   *  RelationalOperator: '<S51>/Compare'
   *  RelationalOperator: '<S52>/Compare'
   *  RelationalOperator: '<S53>/Compare'
   *  RelationalOperator: '<S55>/Compare'
   *  RelationalOperator: '<S56>/Compare'
   *  RelationalOperator: '<S57>/Compare'
   *  RelationalOperator: '<S58>/Compare'
   *  RelationalOperator: '<S59>/Compare'
   */
  P417_SWTR_App_Subsystem_selX((uint8_T)(rtu_Board_XY_Trigg_afhd_in > 0),
    (uint8_T)(rtu_Voice_Trigg_afhd_in > 0), (uint8_T)(rtu_Vol_Trigg_afhd_in > 0),
    (uint8_T)(rtu_Menu_Trigg_afhd_in > 0), (uint8_T)(rtu_Up_Trigg_afhd_in > 0),
    (uint8_T)(rtu_Down_Trigg_afhd_in > 0), (uint8_T)(rtu_Left_Trigg_afhd_in > 0),
    (uint8_T)(rtu_Right_Trigg_afhd_in > 0), (uint8_T)(rtu_Center_Trigg_afhd_in >
    0), &localB->Slect);

  /* End of Outputs for SubSystem: '<S27>/Subsystem_selX' */

  /* MultiPortSwitch: '<S27>/Multiport Switch' incorporates:
   *  Constant: '<S27>/Constant'
   *  Constant: '<S27>/Constant1'
   *  Constant: '<S27>/Constant2'
   *  Constant: '<S27>/Constant3'
   *  Constant: '<S27>/Constant4'
   *  Constant: '<S27>/Constant5'
   *  Constant: '<S27>/Constant6'
   *  Constant: '<S27>/Constant7'
   *  Constant: '<S27>/Constant8'
   */
  switch (localB->Slect) {
   case 1:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(0U);
    break;

   case 2:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(0U);
    break;

   case 3:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(0U);
    break;

   case 4:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(0U);
    break;

   case 5:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(172U);
    break;

   case 6:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(172U);
    break;

   case 7:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(120U);
    break;

   case 8:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(225U);
    break;

   case 9:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(172U);
    break;
  }

  /* End of MultiPortSwitch: '<S27>/Multiport Switch' */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
