Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Bicycl_Computer_NUCLEO-F411RE Bicycl_Computer_NUCLEO-L476RG
Fork of UniGraphic by
SPI8 Class Reference
SPI 8bit interface. More...
#include <SPI8.h>
Inherits Protocols.
Public Member Functions | |
SPI8 (int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC) | |
Create an SPI 8bit display interface with 3 control pins. | |
Protected Member Functions | |
virtual void | wr_cmd8 (unsigned char cmd) |
Send 8bit command to display controller. | |
virtual void | wr_data8 (unsigned char data) |
Send 8bit data to display controller. | |
virtual void | wr_cmd16 (unsigned short cmd) |
Send 2x8bit command to display controller. | |
virtual void | wr_data16 (unsigned short data) |
Send 2x8bit data to display controller. | |
virtual void | wr_gram (unsigned short data) |
Send 16bit pixeldata to display controller. | |
virtual void | wr_gram (unsigned short data, unsigned int count) |
Send same 16bit pixeldata to display controller multiple times. | |
virtual void | wr_grambuf (unsigned short *data, unsigned int lenght) |
Send array of pixeldata shorts to display controller. | |
virtual unsigned short | rd_gram (bool convert) |
Read 16bit pixeldata from display controller (with dummy cycle) | |
virtual unsigned int | rd_reg_data32 (unsigned char reg) |
Read 4x8bit register data (with dummy cycle) | |
virtual unsigned int | rd_extcreg_data32 (unsigned char reg, unsigned char SPIreadenablecmd) |
Read 3x8bit ExtendedCommands register data. | |
virtual void | hw_reset () |
HW reset sequence (without display init commands) | |
virtual void | BusEnable (bool enable) |
Set ChipSelect high or low. |
Detailed Description
SPI 8bit interface.
Definition at line 10 of file SPI8.h.
Constructor & Destructor Documentation
SPI8 | ( | int | Hz, |
PinName | mosi, | ||
PinName | miso, | ||
PinName | sclk, | ||
PinName | CS, | ||
PinName | reset, | ||
PinName | DC | ||
) |
Member Function Documentation
void BusEnable | ( | bool | enable ) | [protected, virtual] |
void hw_reset | ( | ) | [protected, virtual] |
unsigned int rd_extcreg_data32 | ( | unsigned char | reg, |
unsigned char | SPIreadenablecmd | ||
) | [protected, virtual] |
Read 3x8bit ExtendedCommands register data.
- Parameters:
-
reg the register to read SPIreadenablecmd vendor/device specific cmd to read EXTC registers
- Returns:
- data as uint
- Note:
- EXTC regs (0xB0 to 0xFF) are read/write registers but needs special cmd to be read in SPI mode
Implements Protocols.
unsigned short rd_gram | ( | bool | convert ) | [protected, virtual] |
unsigned int rd_reg_data32 | ( | unsigned char | reg ) | [protected, virtual] |
void wr_cmd16 | ( | unsigned short | cmd ) | [protected, virtual] |
void wr_cmd8 | ( | unsigned char | cmd ) | [protected, virtual] |
void wr_data16 | ( | unsigned short | data ) | [protected, virtual] |
void wr_data8 | ( | unsigned char | data ) | [protected, virtual] |
void wr_gram | ( | unsigned short | data ) | [protected, virtual] |
void wr_gram | ( | unsigned short | data, |
unsigned int | count | ||
) | [protected, virtual] |
Generated on Wed Jul 13 2022 20:11:31 by
