/*
 * File: TouchBoard_Y_handle_10ms.c
 *
 * Code generated for Simulink model 'P417_SWTR_App'.
 *
 * Model version                  : 1.150
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Thu Dec 15 23:34:40 2022
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Intel->x86-64 (Windows64)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "TouchBoard_Y_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_Y_handle_10ms' */
void P_TouchBoard_Y_handle_10ms_Init(B_TouchBoard_Y_handle_10ms_P4_T *localB)
{
  /* SystemInitialize for Atomic SubSystem: '<S28>/Subsyste_selY' */
  P417_SWTR_A_Subsystem_selX_Init(&localB->Slect);

  /* End of SystemInitialize for SubSystem: '<S28>/Subsyste_selY' */
}

/* Output and update for function-call system: '<S2>/TouchBoard_Y_handle_10ms' */
void P417_S_TouchBoard_Y_handle_10ms(uint8_T rtu_TouchBoard_Y_input, uint8_T
  rtu_Board_XY_Triggafhd_in, uint8_T rtu_Voice_Triggafhd_in, uint8_T
  rtu_Vol_Triggafhd_in, uint8_T rtu_Menu_Triggafhd_in,
  B_TouchBoard_Y_handle_10ms_P4_T *localB)
{
  /* Outputs for Atomic SubSystem: '<S28>/Subsyste_selY' */

  /* RelationalOperator: '<S105>/Compare' incorporates:
   *  Constant: '<S105>/Constant'
   *  Constant: '<S106>/Constant'
   *  Constant: '<S107>/Constant'
   *  Constant: '<S108>/Constant'
   *  RelationalOperator: '<S106>/Compare'
   *  RelationalOperator: '<S107>/Compare'
   *  RelationalOperator: '<S108>/Compare'
   */
  P417_SWTR_App_Subsystem_selX((uint8_T)(rtu_Board_XY_Triggafhd_in > 0),
    (uint8_T)(rtu_Voice_Triggafhd_in > 0), (uint8_T)(rtu_Vol_Triggafhd_in > 0),
    (uint8_T)(rtu_Menu_Triggafhd_in > 0), &localB->Slect);

  /* End of Outputs for SubSystem: '<S28>/Subsyste_selY' */

  /* MultiPortSwitch: '<S28>/Multiport Switch' incorporates:
   *  Constant: '<S28>/Constant'
   *  Constant: '<S28>/Constant1'
   *  Constant: '<S28>/Constant2'
   */
  switch (localB->Slect) {
   case 1:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnY(rtu_TouchBoard_Y_input);
    break;

   case 2:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnY(41U);
    break;

   case 3:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnY(125U);
    break;

   case 4:
    RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnY(210U);
    break;
  }

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

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