代码搜索结果
找到约 10,000 项符合
SPI 的代码
spi.txt
F240 SPI master/slave example code from the C24x Reference Set, Vol 2, Chapter 5.
All contents (included source, executables, and text)
spi.c
/******************************************************************************
* Copyright (C) 2005 Martin THOMAS, Kaiserslautern, Germany
*
* http://www.siwawi.ar
spi.h
#ifndef SPI_H_
#define SPI_H_
#include
#include
#define SPIPORT PORTB
#define SPIPIN PINB
#define SPIDDR DDRB
#if defined(__AVR_ATmega8__)
#define SPISCK PB5
spi.c
/***********************************************
**spi.c**
**base functions: init, close, read, write.**
*/
#include
#include
#include
#include
spi.h
/*spi.h*/
#ifndef SPI_H
#define SPI_H
int SPI_Init(); //initialzie
int SPI_Write(unsigned char data);
int SPI_Read(unsigned char *data);
void SPI_CSLow(); //cs enable
void SPI_CSHigh(); //cs
spi.h
/***************************************************************************\
Copyright (c) 2004-2007 threewater@up-tech.com, All rights reserved.
by threewter 2005.2.26
\************************
spi.c
/***************************************************************************\
Copyright (c) 2004-2007 threewater@up-tech.com, All rights reserved.
by threewter 2005.2.26
\************************