1/*
2 * File: zero_crossing_types.h
3 *
4 * Code generated for Simulink model 'PMSM_Controller'.
5 *
6 * Model version : 1.1529
7 * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
8 * C/C++ source code generated on : Tue Aug 2 19:43:20 2022
9 *
10 * Target selection: ert.tlc
11 * Embedded hardware selection: ARM Compatible->ARM Cortex-M
12 * Code generation objectives:
13 * 1. Execution efficiency
14 * 2. RAM efficiency
15 * Validation result: Not run
16 */
17
18#ifndef ZERO_CROSSING_TYPES_H
19#define ZERO_CROSSING_TYPES_H
20#include "rtwtypes.h"
21
22/* Trigger directions: falling, either, and rising */
23typedef enum {
24 FALLING_ZERO_CROSSING = -1,
25 ANY_ZERO_CROSSING = 0,
26 RISING_ZERO_CROSSING = 1
27} ZCDirection;
28
29/* Previous state of a trigger signal */
30typedef uint8_T ZCSigState;
31
32/* Initial value of a trigger zero crossing signal */
33#define UNINITIALIZED_ZCSIG 0x03U
34#define NEG_ZCSIG 0x02U
35#define POS_ZCSIG 0x01U
36#define ZERO_ZCSIG 0x00U
37
38/* Current state of a trigger signal */
39typedef enum {
40 FALLING_ZCEVENT = -1,
41 NO_ZCEVENT = 0,
42 RISING_ZCEVENT = 1
43} ZCEventType;
44
45#endif /* ZERO_CROSSING_TYPES_H */
46
47/*
48 * File trailer for generated code.
49 *
50 * [EOF]
51 */
52