⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signal_group.h

📁 基于摩托罗拉(现在飞思卡尔)MC68HC908AZ60A系列单片机
💻 H
字号:

/******************全局变量*数据信号定义**********************/

/************中央控制器信号组***************/


typedef union {
   byte Byte;
   struct {
     byte ctr_err     :1;
     byte bus_err     :1;
     byte crash       :2;
     byte fire        :2;
     byte speed       :1;
     byte child_lock  :1;
   }Bit;
  }center_status0;
extern  volatile  center_status0   _cent0;
#define cent_sta0                _cent0.Byte
#define cent_sta0_ctr_err        _cent0.Bit.ctr_err   
#define cent_sta0_bus_err        _cent0.Bit.bus_err
#define cent_sta0_crash          _cent0.Bit.crash
#define cent_sta0_fire           _cent0.Bit.fire
#define cent_sta0_speed          _cent0.Bit.speed
#define cent_sta0_child_lock     _cent0.Bit.child_lock


typedef union {
   byte Byte;
   struct {
     byte cent_outlock   :2;
     byte cent_inlock    :2;
     byte cent_lock_sta  :4;
   }Bit;
  }center_status1;
extern  volatile  center_status1   _cent1 ;
#define cent_sta1                  _cent1.Byte
#define cent_sta1_cent_outlock     _cent1.Bit.cent_outlock
#define cent_sta1_cent_inlock      _cent1.Bit.cent_inlock
#define cent_sta1_cent_lock_sta    _cent1.Bit.cent_lock_sta


typedef union {
    byte Byte;
    struct {
      byte lf_auto_dn      :1;
      byte lf_manual_dn    :1;
      byte lf_auto_up      :1;
      byte lf_manual_up    :1;
      byte rf_auto_dn      :1;
      byte rf_manual_dn    :1;
      byte rf_auto_up      :1;
      byte rf_manual_up    :1; 
     }Bit;
  }center_status2;
extern  volatile  center_status2   _cent2;
#define cent_sta2                  _cent2.Byte
#define cent_sta2_lf_auto_dn       _cent2.Bit.lf_auto_dn    
#define cent_sta2_lf_manual_dn     _cent2.Bit.lf_manual_dn    
#define cent_sta2_lf_auto_up       _cent2.Bit.lf_auto_up    
#define cent_sta2_lf_manual_up     _cent2.Bit.lf_manual_up    
#define cent_sta2_rf_auto_dn       _cent2.Bit.rf_auto_dn    
#define cent_sta2_rf_manual_dn     _cent2.Bit.rf_manual_dn    
#define cent_sta2_rf_auto_up       _cent2.Bit.rf_auto_up    
#define cent_sta2_rf_manual_up     _cent2.Bit.rf_manual_up   


typedef union {
    byte Byte;
    struct {
      byte lr_auto_dn      :1;
      byte lr_manual_dn    :1;
      byte lr_auto_up      :1;
      byte lr_manual_up    :1;
      byte rr_auto_dn      :1;
      byte rr_manual_dn    :1;
      byte rr_auto_up      :1;
      byte rr_manual_up    :1; 
     }Bit;
  }center_status3;
extern  volatile  center_status3   _cent3;
#define cent_sta3                  _cent3.Byte
#define cent_sta3_lr_auto_dn       _cent3.Bit.lr_auto_dn    
#define cent_sta3_lr_manual_dn     _cent3.Bit.lr_manual_dn    
#define cent_sta3_lr_auto_up       _cent3.Bit.lr_auto_up    
#define cent_sta3_lr_manual_up     _cent3.Bit.lr_manual_up    
#define cent_sta3_rr_auto_dn       _cent3.Bit.rr_auto_dn    
#define cent_sta3_rr_manual_dn     _cent3.Bit.rr_manual_dn    
#define cent_sta3_rr_auto_up       _cent3.Bit.rr_auto_up    
#define cent_sta3_rr_manual_up     _cent3.Bit.rr_manual_up          



/***********左前门模块信号组**********/


typedef union  {
    byte Byte;
    struct  {
      byte ctr_err         :1;
      byte bus_err         :1;
      byte lf_sta          :2;
      byte cent_lock_sta   :4;
    }Bit;
  }lf_status0;
extern  volatile  lf_status0     _lf0;
#define  lf_sta0                 _lf0.Byte
#define  lf_sta0_ctr_err         _lf0.Bit.ctr_err
#define  lf_sta0_bus_err         _lf0.Bit.bus_err
#define  lf_sta0_lf_sta          _lf0.Bit.lf_sta
#define  lf_sta0_cent_lock_sta   _lf0.Bit.cent_lock_sta      


typedef  union  {
    byte  Byte;
    struct   {
      byte  R                :3;
      byte  lf_moto_sta      :3;
      byte  lf_lock_sta      :2;
    }Bit;
   }lf_status1;
extern  volatile  lf_status1           _lf1;
#define  lf_sta1                       _lf1.Byte
#define  lf_sta1_R                     _lf1.Bit.R
#define  lf_sta1_lf_moto_sta           _lf1.Bit.lf_moto_sta
#define  lf_sta1_lf_lock_sta           _lf1.Bit.lf_lock_sta


typedef  union   {
     byte  Byte;
     struct  {
       byte  R                   :2;
       byte  mirror_regulate     :3;
       byte  mirror_select       :3;
      }Bit;
    }lf_status2;
extern  volatile  lf_status2           _lf2;
#define   lf_sta2                      _lf2.Byte
#define   lf_sta2_R                    _lf2.Bit.R
#define   lf_sta2_mir_regu             _lf2.Bit.mirror_regulate
#define   lf_sta2_mir_sel              _lf2.Bit.mirror_select
 

/***********右前门模块信号组**********/


typedef  union    {
     byte  Byte;
     struct  {
       byte  ctr_err                 :1;
       byte  bus_err                 :1;
       byte  rf_sta                  :2;
       byte  cent_lock_sta           :4;
      }Bit;
    }rf_status0;
extern  volatile  rf_status0           _rf0;
#define   rf_sta0                      _rf0.Byte
#define   rf_sta0_ctr_err              _rf0.Bit.ctr_err
#define   rf_sta0_bus_err              _rf0.Bit.bus_err
#define   rf_sta0_rf_sta               _rf0.Bit.rf_sta
#define   rf_sta0_cent_lock_sta        _rf0.Bit.cent_lock_sta


typedef  union   {
        byte  Byte;
        struct  {
          byte  R                     :1;
          byte  rf_cent_outlock       :2;
          byte  rf_moto_sta           :3;
          byte  rf_lock_sta           :2;
        }Bit;
      }rf_status1;
extern  volatile  rf_status1              _rf1;
#define   rf_sta1                         _rf1.Byte 
#define   rf_sta1_R                       _rf1.Bit.R
#define   rf_sta1_rf_cent_outlock         _rf1.Bit.rf_cent_outlock
#define   rf_sta1_rf_moto_sta             _rf1.Bit.rf_moto_sta
#define   rf_sta1_rf_lock_sta             _rf1.Bit.rf_lock_sta


/***********左后门模块信号组**********/ 

                
typedef  union    {
     byte  Byte;
     struct  {
       byte  ctr_err                 :1;
       byte  bus_err                 :1;
       byte  lr_sta                  :2;
       byte  cent_lock_sta           :4;
      }Bit;
    }lr_status0;
extern  volatile  lr_status0           _lr0;
#define   lr_sta0                      _lr0.Byte
#define   lr_sta0_ctr_err              _lr0.Bit.ctr_err
#define   lr_sta0_bus_err              _lr0.Bit.bus_err
#define   lr_sta0_lr_sta               _lr0.Bit.lr_sta
#define   lr_sta0_cent_lock_sta        _lr0.Bit.cent_lock_sta


typedef  union   {
        byte  Byte;
        struct  {
          byte  R                     :3;
          byte  lr_moto_sta           :3;
          byte  lr_lock_sta           :2;
        }Bit;
      }lr_status1;
extern  volatile  lr_status1              _lr1;
#define   lr_sta1                         _lr1.Byte 
#define   lr_sta1_R                       _lr1.Bit.R
#define   lr_sta1_lr_moto_sta             _lr1.Bit.lr_moto_sta
#define   lr_sta1_lr_lock_sta             _lr1.Bit.lr_lock_sta



/***********右后门模块信号组**********/                 


typedef  union    {
     byte  Byte;
     struct  {
       byte  ctr_err                 :1;
       byte  bus_err                 :1;
       byte  rr_sta                  :2;
       byte  cent_lock_sta           :4;
      }Bit;
    }rr_status0;
extern  volatile  rr_status0           _rr0;
#define   rr_sta0                      _rr0.Byte
#define   rr_sta0_ctr_err              _rr0.Bit.ctr_err
#define   rr_sta0_bus_err              _rr0.Bit.bus_err
#define   rr_sta0_rr_sta               _rr0.Bit.rr_sta
#define   rr_sta0_cent_lock_sta        _rr0.Bit.cent_lock_sta


typedef  union   {
        byte  Byte;
        struct  {
          byte  R                     :3;
          byte  rr_moto_sta           :3;
          byte  rr_lock_sta           :2;
        }Bit;
      }rr_status1;
extern  volatile  rr_status1              _rr1;
#define   rr_sta1                         _rr1.Byte 
#define   rr_sta1_R                       _rr1.Bit.R
#define   rr_sta1_rr_moto_sta             _rr1.Bit.rr_moto_sta
#define   rr_sta1_rr_lock_sta             _rr1.Bit.rr_lock_sta

/**********************/

/*   center controller windows and mirrors control  */
  
  
typedef union {
   byte Byte;
   struct {
     byte lfwin_up_300_enable0     :1;  
     byte lfwin_up_300_reach0      :1;  
     byte lfwin_dn_300_enable0     :1;  
     byte lfwin_dn_300_reach0      :1;  
     byte rfwin_up_300_enable0     :1;  
     byte rfwin_up_300_reach0      :1;  
     byte rfwin_dn_300_enable0     :1;  
     byte rfwin_dn_300_reach0      :1;  
   }Bit;
  }win_status0;
extern volatile   win_status0      _win0;
#define  win_moto_sta0             _win0.Byte
#define  lfwin_up_300_enable       _win0.Bit.lfwin_up_300_enable0   
#define  lfwin_up_300_reach        _win0.Bit.lfwin_up_300_reach0   
#define  lfwin_dn_300_enable       _win0.Bit.lfwin_dn_300_enable0   
#define  lfwin_dn_300_reach        _win0.Bit.lfwin_dn_300_reach0   
#define  rfwin_up_300_enable       _win0.Bit.rfwin_up_300_enable0   
#define  rfwin_up_300_reach        _win0.Bit.rfwin_up_300_reach0   
#define  rfwin_dn_300_enable       _win0.Bit.rfwin_dn_300_enable0   
#define  rfwin_dn_300_reach        _win0.Bit.rfwin_dn_300_reach0   
  
  
typedef union {
   byte Byte;
   struct {
     byte lrwin_up_300_enable0     :1;  
     byte lrwin_up_300_reach0      :1;  
     byte lrwin_dn_300_enable0     :1;  
     byte lrwin_dn_300_reach0      :1;  
     byte rrwin_up_300_enable0     :1;  
     byte rrwin_up_300_reach0      :1;  
     byte rrwin_dn_300_enable0     :1;  
     byte rrwin_dn_300_reach0      :1;  
   }Bit;
  }win_status1;
extern volatile win_status1        _win1;
#define  win_moto_sta1             _win1.Byte
#define  lrwin_up_300_enable       _win1.Bit.lrwin_up_300_enable0   
#define  lrwin_up_300_reach        _win1.Bit.lrwin_up_300_reach0   
#define  lrwin_dn_300_enable       _win1.Bit.lrwin_dn_300_enable0   
#define  lrwin_dn_300_reach        _win1.Bit.lrwin_dn_300_reach0   
#define  rrwin_up_300_enable       _win1.Bit.rrwin_up_300_enable0   
#define  rrwin_up_300_reach        _win1.Bit.rrwin_up_300_reach0   
#define  rrwin_dn_300_enable       _win1.Bit.rrwin_dn_300_enable0   
#define  rrwin_dn_300_reach        _win1.Bit.rrwin_dn_300_reach0   




    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -