📄 main.c
字号:
/*
**********************************************************************************************
* Project: T8Lib
* File: main.c
* Contents:
* The main handler
* CPU clock 15MHZ
*
* $Date: 10/13/05 Michal v0.1
*
* Copyright (c) 2005 Fameg, Inc. All rights reserved
***********************************************************************************************
*/
#define USER_CONFIG 1 //import ezT8 library interface
#include <string.h>
#include <stdio.h>
#include "ezT8.h"
#include "I2c.h"
#include "spi.h"
BYTE xdata writedata[20] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,\
0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99};
xdata BYTE readdata[20];
void main(void)
{
TMOD=0x20;
TL1=TH1=0xfd;
TR1=1;
SCON=0x50;
PCON=0x00;
I2c_Init(0xEA,0);
I2c_RcvStr(0xEA,readdata,20);
I2c_SendStr(0xEA,writedata, 20);
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -