dsa.h

来自「这是一个成熟的DSA通讯持续,可以在单片机之间通讯用.」· C头文件 代码 · 共 34 行

H
34
字号
#include<at89x52.h>
#include"typedefine.h"

#ifndef	__dsa_h__
#define __dsa_h__
/*------------------------------------------------
-------------------------------------------------*/

#define Ack P0_0
#define Stb P0_3
#define S_data P0_2
/*------------------------------------------------
-------------------------------------------------*/
static void dsa_init();
static void Wr_data(int w_data, uchar w_ldat);  //写字节
static uchar Rd_data();        //读字节 有返回值
/*------------------------------------------------
-------------------------------------------------*/

static uchar Time_out;
static uchar check_count;
/*------------------------------------------------
-------------------------------------------------*/
extern uchar Send_ok;
extern uchar Read_ok;
extern uchar dsa_com;
extern uchar dsa_data1;
extern uchar dsa_data2;
/*------------------------------------------------
-------------------------------------------------*/
extern void Wr_command(uchar wdsa_c,uchar wdsa_d,uchar wdsa_l)  ; //写命令
extern void Rd_command() ; //读命令

#endif

⌨️ 快捷键说明

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