Digilent chipKIT Basic I/O Shield 참조 매뉴얼 - 페이지 12
{카테고리_이름} Digilent chipKIT Basic I/O Shield에 대한 참조 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. Digilent chipKIT Basic I/O Shield 14 페이지.
chipKIT™ Basic I/O Shield™ Reference Manual
**
none
**
**
Errors:
**
none
**
**
Description:
**
Update the OLED display with the contents of the memory buffer
*/
void
OledUpdate()
{
int
ipag;
int
icol;
BYTE *
pb;
pb = rgbOledBmp;
for (ipag = 0; ipag < cpagOledMax; ipag++) {
PORTClearBits(prtDataCmd, bitDataCmd);
/* Set the page address
*/
Spi2PutByte(0x22);
Spi2PutByte(ipag);
/* Start at the left column
*/
Spi2PutByte(0x00);
Spi2PutByte(0x10);
PORTSetBits(prtDataCmd, bitDataCmd);
/* Copy this memory page of display data.
*/
OledPutBuffer(ccolOledMax, pb);
pb += ccolOledMax;
}
}
Low-Level SPI Functions
The following functions are used to write data to the display panel using the SPI controller.
/* ------------------------------------------------------------ */
/*** OledPutBuffer
**
**
Parameters:
**
cb
- number of bytes to send/receive
**
rgbTx
- pointer to the buffer to send
**
**
Return Value:
**
none
**
**
Errors:
**
none
**
**
Description:
**
Send the bytes specified in rgbTx to the slave.
*/
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
//Set page command
//page number
//set low nybble of column
//set high nybble of column
Page 12 of 13