代码搜索结果
找到约 10,000 项符合
SPI 的代码
spi.lst
C51 COMPILER V6.23a SPI 11/02/2007 08:49:05 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE SPI
OBJECT MODULE PLACED IN Sp
spi.h
//*********************************************************
// 项 目: 通用控制器-V1.0
// 文件名: Spi.h
// 描 述: 头文件
//*********************************************************
//#ifndef _BYTE_DEF_
/
spi.__i
-c --device DARMP -g -O0 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\OutPut\spi.o" "SPI\spi.c"
spi.c
/****************************************Copyright (c)**************************************************
** 广州周立功单片机发展有限公司
** 研 究
spi.h
/****************************************Copyright (c)**************************************************
** 广州周立功单片机发展有限公司
** 研 究
spi.c
#include
#include "SPI.h"
u8_t DATA_BUF;
void SpiInit(void)
{
*(u8_t *)RFDIR=0x80; //F7输入,其余输出
*(u8_t *)REDIR=0x0;
asm("setb RFOUT,5
clrb RFOUT,4"); //SPI_CSN=1,Spi
spi.h
#ifndef SPI_H
#define SPI_H
void SpiInit(void);
u8_t SpiRead(void);
void SpiWrite(u8_t send);
#endif
spi.c
#include
#include "SPI.h"
void SPI_Init(void)
{
// P3.1 P3.2 P3.3作为SPI的管脚
P3SEL = BIT3 + BIT2 + BIT1;
//P3.1作为输出
P3DIR |= BIT1;
//P3.0作为输出
P3DIR |= B