66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
![]() |
/*
|
||
|
* File: led.c
|
||
|
*
|
||
|
* Code generated for Simulink model 'led'.
|
||
|
*
|
||
|
* Model version : 1.1
|
||
|
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
|
||
|
* C/C++ source code generated on : Wed Dec 27 10:44:19 2023
|
||
|
*
|
||
|
* Target selection: ert.tlc
|
||
|
* Embedded hardware selection: Custom Processor->Custom Processor
|
||
|
* Code generation objectives: Unspecified
|
||
|
* Validation result: Not run
|
||
|
*/
|
||
|
|
||
|
#include "led.h"
|
||
|
#include "rtwtypes.h"
|
||
|
|
||
|
/* Block states (default storage) */
|
||
|
DW_led_T led_DW;
|
||
|
|
||
|
/* External outputs (root outports fed by signals with default storage) */
|
||
|
ExtY_led_T led_Y;
|
||
|
|
||
|
/* Real-time model */
|
||
|
static RT_MODEL_led_T led_M_;
|
||
|
RT_MODEL_led_T *const led_M = &led_M_;
|
||
|
|
||
|
/* Model step function */
|
||
|
void led_step(void)
|
||
|
{
|
||
|
boolean_T rtb_Delay;
|
||
|
|
||
|
/* Delay: '<Root>/Delay' */
|
||
|
rtb_Delay = led_DW.Delay_DSTATE[0];
|
||
|
|
||
|
/* Outport: '<Root>/Out1' incorporates:
|
||
|
* Delay: '<Root>/Delay'
|
||
|
*/
|
||
|
led_Y.Out1 = led_DW.Delay_DSTATE[0];
|
||
|
|
||
|
/* Update for Delay: '<Root>/Delay' incorporates:
|
||
|
* Logic: '<Root>/Logical Operator'
|
||
|
*/
|
||
|
led_DW.Delay_DSTATE[0] = led_DW.Delay_DSTATE[1];
|
||
|
led_DW.Delay_DSTATE[1] = !rtb_Delay;
|
||
|
}
|
||
|
|
||
|
/* Model initialize function */
|
||
|
void led_initialize(void)
|
||
|
{
|
||
|
/* (no initialization code required) */
|
||
|
}
|
||
|
|
||
|
/* Model terminate function */
|
||
|
void led_terminate(void)
|
||
|
{
|
||
|
/* (no terminate code required) */
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* File trailer for generated code.
|
||
|
*
|
||
|
* [EOF]
|
||
|
*/
|