📄 spi.h
字号:
//********************************************************************************************
//
// Title : MP3测试 - SPI驱动程序文件头
// Author : Pascal Stang - Copyright (C) 2000-2002
// Created : 2005/02/16
// Revised : 2005/02/19
// Version : 0.1
// Target MCU : MEGA16
// Editor Tabs : 4
//
// 本文件来自"Procyon AVRlib".
//
// 注: 本代码用于测试STA013硬件及其驱动程序, 并非一个完整的MP3播放器程序.
// 上电后,会循环不停播放一段约2秒的MP3音乐.
// 硬件没有连接RAM缓冲及储存MP3文件的设备, MP3数据是保存在AVR的FLASH中.
// 本代码经测试, 但可能存有Bugs, 若你发现有任何Bug或有任何建议,
// 请来信告知: gz_ant@126.com
//// 本代码部分来自"Procyon AVRlib": http://hubbard.engr.scu.edu/embedded/avr/avrlib/release_notes.html
// 特此感谢它的创始人: Pascal Stang !
//
// 感谢在www.21icbbs.com帮助过winsu的朋友, 希望使用者能发扬网络的 "自由,开放" 精神.
//********************************************************************************************
#ifndef SPI_H
#define SPI_H
//#include "global.h"
// function prototypes
// SPI interface initializer
void spiInit(void);
// spiSendByte(u08 data) waits until the SPI interface is ready
// and then sends a single byte over the SPI port. This command
// does not receive anything.
void spiSendByte(u8 data);
// spiTransferByte(u08 data) waits until the SPI interface is ready
// and then sends a single byte over the SPI port. The function also
// returns the byte that was received during transmission.
u8 spiTransferByte(u8 data);
// spiTransferWord(u08 data) works just like spiTransferByte but
// operates on a whole word (16-bits of data).
u16 spiTransferWord(u16 data);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -