12.07.2015 Views

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MPLAB ® <strong>C18</strong> C 编 译 器 函 数 库WriteSWSPIputcSWSPI功 能 : 向 软 件 SPI 写 一 个 字 节 。包 含 头 文 件 : sw_spi.h原 型 : char WriteSWSPI( char data );参 数 :data要 写 到 软 件 SPI 的 数 据 。说 明 :该 函 数 将 指 定 的 数 据 字 节 写 到 软 件 SPI, 并 且 返 回 读 取 的 数 据 字 节 。 该函 数 不 提 供 对 片 选 引 脚 (CS) 的 控 制 。返 回 值 : 该 函 数 返 回 从 软 件 SPI 的 (DIN) 引 脚 的 数 据 中 读 取 的 数 据 字 节 。文 件 名 :wrtsspi.c代 码 示 例 ; char addr = 0x10;char result;result = WriteSWSPI( addr );3.5.2 使 用 示 例#include #include #include void main( void ){char address;// configure software SPIOpenSWSPI();}for( address=0; address

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!