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

📄 md_funcs.h

📁 AT80296C 单片机中使用此头文件可方便查找东西,方便于编程 板头文件
💻 H
字号:
/*
 * @(#)md_funcs.h	1.4
 * Special functions for 80C196MD and compatible processors.
 */
#ifndef _md_funcs_h
#define _md_funcs_h

void            enable(void);
void            disable(void);

void            enable_pts(void);
void            disable_pts(void);

void            power_down(void);
void            idle(void);

/****************************************************************************/
/* Define typedefs for PTS Control Blocks of 80C196MD.                      */
/****************************************************************************/

/*
 * Single Transfer PTS Control Block
 */
typedef struct STran_ptscb_t
{
    unsigned char       ptscount;
    struct
    {
        unsigned int        di   : 1;
        unsigned int        si   : 1;
        unsigned int        du   : 1;
        unsigned int        su   : 1;
        unsigned int        b_w  : 1;
        unsigned int        mode : 3;
    } ptscon;
    void               *ptssrc;
    void               *ptsdst;
    int                 :16;                                /* unused */
} STran_ptscb;


/*
 * Block Transfer PTS Control Block
 */
typedef struct BTran_ptscb_t
{
    unsigned char       ptscount;
    struct
    {
        unsigned int        di   : 1;
        unsigned int        si   : 1;
        unsigned int        du   : 1;
        unsigned int        su   : 1;
        unsigned int        b_w  : 1;
        unsigned int        mode : 3;
    } ptscon;
    void               *ptssrc;
    void               *ptsdst;
    unsigned char       ptsblock;
    int                 :8;                                 /* unused */
} BTran_ptscb;


/*
 * A/D Mode PTS Control Block
 */
typedef struct AD_ptscb_t
{
    unsigned char       ptscount;
    struct
    {
        unsigned int        const1 : 3;
        unsigned int        updt   : 1;
        unsigned int        const2 : 1;
        unsigned int        mode   : 3;
    } ptscon;
    void                *ptsptr1;
    void                *ptsptr2;
    int                 :16;                                /* unused */
} AD_ptscb;


/*
 *  PTS A/D Table
 */
typedef struct AD_tab_t
{
    unsigned char       AD_command;
    unsigned int        AD_result;
} AD_tab;


/*
 * Serial I/O PTS Control Block
 */
typedef struct SIO_ptscb_t
{
    unsigned char       ptscount;
    struct
    {
        unsigned int        maj    : 1;
        unsigned int        sa_1   : 1;
        unsigned int        const1 : 2;
        unsigned int        sa_2   : 1;                     /* should be the same as sa_1 */
        unsigned int        mode   : 3;
    } ptscon;
    void                *epareg;
    unsigned int        baud;
    struct SIO_ptscb2_t *ptsvec;
} SIO_ptscb;

typedef struct SIO_ptscb2_t
{
    void                *portreg;
    unsigned char       portmsk;
    union
    {
        struct
        {
            unsigned int        tpar   : 1;
            unsigned int        fe     : 1;
            unsigned int        const1 : 3;
            unsigned int        pen    : 1;
            unsigned int        rpar   : 1;
            unsigned int        const2 : 1;
        } asiocon;
        struct
        {
            unsigned int        const1 : 1;
            unsigned int        trc    : 1;
            unsigned int        const2 : 6;
        } ssiocon;
    } ptscon1;
    unsigned int        data;
    unsigned char       samptime;
    int                 :8;
} SIO_ptscb2;

#endif  /* _md_funcs_h */

⌨️ 快捷键说明

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