/*
 * File: rt_sys_P417_SWTR_App_5.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 "rt_sys_P417_SWTR_App_5.h"

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

/*
 * System initialize for atomic system:
 *    '<S27>/Subsystem_selX'
 *    '<S28>/Subsyste_selY'
 */
void P417_SWTR_A_Subsystem_selX_Init(uint8_T *rty_SLECT)
{
  /* SystemInitialize for Chart: '<S103>/Slect_X' */
  *rty_SLECT = 0U;
}

/*
 * Output and update for atomic system:
 *    '<S27>/Subsystem_selX'
 *    '<S28>/Subsyste_selY'
 */
void P417_SWTR_App_Subsystem_selX(uint8_T rtu_Board_XY_Trigg, uint8_T
  rtu_Voice_Trigg, uint8_T rtu_Vol_Trigg, uint8_T rtu_Menu_Trigg, uint8_T
  *rty_SLECT)
{
  /* Chart: '<S103>/Slect_X' */
  /*  Die2_A_Position_Judgement */
  if ((rtu_Voice_Trigg == 0) && (rtu_Vol_Trigg == 0) && (rtu_Menu_Trigg == 0) &&
      (rtu_Board_XY_Trigg == 1)) {
    *rty_SLECT = 1U;
  } else if ((rtu_Voice_Trigg == 1) && (rtu_Vol_Trigg == 0) && (rtu_Menu_Trigg ==
              0)) {
    *rty_SLECT = 2U;
  } else if ((rtu_Voice_Trigg == 0) && (rtu_Vol_Trigg == 1) && (rtu_Menu_Trigg ==
              0)) {
    *rty_SLECT = 3U;
  } else {
    if ((rtu_Voice_Trigg == 0) && (rtu_Vol_Trigg == 0) && (rtu_Menu_Trigg == 1))
    {
      *rty_SLECT = 4U;
    }
  }

  /* End of Chart: '<S103>/Slect_X' */
}

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