“C8051F SPI程序”的版本间的差异
来自丢石头百科
(/********************************************************************************************************** File : ws_spi_port.h* Hardware Environment:* Build Environment : Silicon LABs 3.42.00 / uVis ...) |
小 (文本替换 - 替换“www.waveshare.net”为“{{SERVERNAME}}”) |
||
第10行: | 第10行: | ||
* | * | ||
* (c) Copyright 2005-2010, WaveShare | * (c) Copyright 2005-2010, WaveShare | ||
− | * <a class="Blue_2_12px_" href="http:// | + | * <a class="Blue_2_12px_" href="http://{{SERVERNAME}}/" style="color: rgb(7, 66, 184);" target="_blank">http://{{SERVERNAME}} |
* All Rights Reserved | * All Rights Reserved | ||
第46行: | 第46行: | ||
* | * | ||
* (c) Copyright 2005-2010, WaveShare | * (c) Copyright 2005-2010, WaveShare | ||
− | * <a class="Blue_2_12px_" href="http:// | + | * <a class="Blue_2_12px_" href="http://{{SERVERNAME}}/" style="color: rgb(7, 66, 184);" target="_blank">http://{{SERVERNAME}} |
* All Rights Reserved | * All Rights Reserved |
2019年11月19日 (二) 09:22的版本
/********************************************************************************************************
- File : ws_spi_port.h
- Hardware Environment:
- Build Environment : Silicon LABs 3.42.00 / uVision3 V3.80 20100913
- Version :
- By : Su Wei Feng
- (c) Copyright 2005-2010, WaveShare
- <a class="Blue_2_12px_" href="http://wiki.diustou.com/" style="color: rgb(7, 66, 184);" target="_blank">http://wiki.diustou.com
- All Rights Reserved
-
- /
- ifndef _WS_SPI_PORT_H_
- define _WS_SPI_PORT_H_
void spiSendChar(uchar send_char);
/*Hardware Environment:DVK501 && F320 EX*/
- if defined(_DVK501_F320_EX_)
sbit CS_LCD = P0^7; void SPI_Init(void) { XBR0 |= 0x03; P0SKIP |= 0x80; P0MDOUT |= 0xC1; SPI0CFG = 0x40; SPI0CN = 0x01; SPI0CKR = 0x05; }
- else
- warning "No SPI!"
- endif
- include <../../../../library/C8051F/ws_spi.h>
- endif /*_WS_SPI_PORT_H_*/
/********************************************************************************************************
- File : ws_spi.h
- Hardware Environment:
- Build Environment : Silicon LABs 3.42.00 / uVision3 V3.80 20100913
- Version :
- By : Su Wei Feng
- (c) Copyright 2005-2010, WaveShare
- <a class="Blue_2_12px_" href="http://wiki.diustou.com/" style="color: rgb(7, 66, 184);" target="_blank">http://wiki.diustou.com
- All Rights Reserved
-
- /
- ifndef _WS_SPI_H_
- define _WS_SPI_H_
void spiSendChar(uchar send_char) { SPIF = 0; SPI0DAT = send_char; while (!SPIF); }
- endif /*_WS_SPI_H_*/