Sensorian
1.0
C API Reference Guide Library
|
TFT library header. More...
#include "bcm2835.h"
Go to the source code of this file.
Data Structures | |
struct | _Image |
Image type. Contains image array with height and width dimensions. More... | |
Macros | |
#define | NOP 0x00 |
#define | SWRESET 0x01 |
#define | RDDID 0x04 |
#define | RDDST 0x09 |
#define | RDDPM 0x0A |
#define | RDDMADCTL 0x0B |
#define | RDDCOLMOD 0x0C |
#define | RDDIM 0x0D |
#define | RDDSM 0x0E |
#define | RDDSDR 0x0F |
#define | SLEEP_IN 0x10 |
#define | SLEEP_OUT 0x11 |
#define | PTLON 0x12 |
#define | NORON 0x13 |
#define | INVOFF 0x20 |
#define | INVON 0x21 |
#define | GAMSET 0x26 |
#define | DISPOFF 0x28 |
#define | DISPON 0x29 |
#define | CASET 0x2A |
#define | RASET 0x2B |
#define | RAMWR 0x2C |
#define | RGBSET 0x2D |
#define | RAMRD 0x2E |
#define | PTLAR 0x30 |
#define | SCRLAR 0x33 |
#define | TEOFF 0x34 |
#define | TEON 0x35 |
#define | MADCTL 0x36 |
#define | VSCSAD 0x37 |
#define | IDLE_MODE_OFF 0x38 |
#define | IDLE_MODE_ON 0x39 |
#define | COLMOD 0x3A |
#define | RDID1 0xDA |
#define | RDID2 0xDB |
#define | RDID3 0xDC |
#define | FRMCTR1 0xB1 |
#define | FRMCTR2 0xB2 |
#define | FRMCTR3 0xB3 |
#define | INVCTR 0xB4 |
#define | DISSET5 0xB6 |
#define | PWCTR1 0xC0 |
#define | PWCTR2 0xC1 |
#define | PWCTR3 0xC2 |
#define | PWCTR4 0xC3 |
#define | PWCTR5 0xC4 |
#define | VMCTR1 0xC5 |
#define | VMOFCTR 0xC7 |
#define | WRID2 0xD1 |
#define | WRID3 0xD2 |
#define | NVFCTR1 0xD9 |
#define | NVFCTR2 0xDE |
#define | NVFCTR3 0xDF |
#define | GMCTRP1 0xE0 |
#define | GMCTRN1 0xE1 |
#define | GCV 0xFC |
#define | DUMMY 0xff |
#define | MADCTL_MY 0x80 |
#define | MADCTL_MX 0x40 |
#define | MADCTL_MV 0x20 |
#define | MADCTL_ML 0x10 |
#define | MADCTL_MH 0x04 |
#define | MADCTL_M1 0x00 |
#define | MADCTL_M2 0b10000000 |
#define | MADCTL_M3 0b01000000 |
#define | MADCTL_M4 0b11000000 |
#define | MADCTL_M5 0b00100000 |
#define | MADCTL_M6 0b10100000 |
#define | MADCTL_M7 0b01100000 |
#define | MADCTL_M8 0b11100000 |
#define | MADCTL_RGB 0x00 |
#define | MADCTL_BGR 0x08 |
#define | WIDTH 0x7F /** Display width 127 pixel. */ |
#define | HEIGHT 0x9F /** Display height 159 pixel. */ |
#define | RED 0xf800 /** Red color. */ |
#define | GREEN 0x07e0 /** Green color. */ |
#define | BLUE 0x001f /** Blue color. */ |
#define | WHITE 0xffff /** White color. */ |
#define | BLACK 0x0000 /** Black color. */ |
#define | YELLOW 0xFFE0 /** Yellow color. */ |
#define | GRAY0 0xEF7D /** Gray color. */ |
#define | GRAY1 0x8410 /** Gray color. */ |
#define | GRAY2 0x4208 /** Gray color. */ |
#define | BLACK 0x0000 /** Black color. */ |
#define | MAROON 0x8000 /** Maroon color. */ |
#define | OLIVE 0x8400 /** Olive color. */ |
#define | NAVY 0x0010 /** Navy color. */ |
#define | PURPLE 0x8010 /** Purple color. */ |
#define | CS_OUTPUT() bcm2835_gpio_fsel(RPI_V2_GPIO_P1_24,BCM2835_GPIO_FSEL_OUTP); |
#define | CS_LOW() bcm2835_gpio_write(RPI_V2_GPIO_P1_24, LOW); |
#define | CS_HIGH() bcm2835_gpio_write(RPI_V2_GPIO_P1_24, HIGH); |
#define | DC_OUTPUT() bcm2835_gpio_fsel(RPI_V2_GPIO_P1_22,BCM2835_GPIO_FSEL_OUTP); |
#define | DC_LOW() bcm2835_gpio_write(RPI_V2_GPIO_P1_22, LOW); |
#define | DC_HIGH() bcm2835_gpio_write(RPI_V2_GPIO_P1_22, HIGH); |
#define | RST_OUTPUT() bcm2835_gpio_fsel(RPI_V2_GPIO_P1_16,BCM2835_GPIO_FSEL_OUTP); |
#define | RST_LOW() bcm2835_gpio_write(RPI_V2_GPIO_P1_16, LOW); |
#define | RST_HIGH() bcm2835_gpio_write(RPI_V2_GPIO_P1_16, HIGH); |
Typedefs | |
typedef struct _Image | Image_t |
Image type. Contains image array with height and width dimensions. More... | |
Enumerations | |
enum | orientation_t { PORTRAIT =0, PORTRAIT_REF =2, PORTRAIT_INV_REF =3, PORTRAIT_INV =5, LANDSCAPE =6, LANDSCAPE_INV =4, LANDSCAPE_REF =1, LANDSCAPE_INV_REF =7, PORTRAIT =0, PORTRAIT_REF =2, PORTRAIT_INV_REF =3, PORTRAIT_INV =5, LANDSCAPE =6, LANDSCAPE_INV =4, LANDSCAPE_REF =1, LANDSCAPE_INV_REF =7, PORTRAIT =0, PORTRAIT_REF =2, PORTRAIT_INV_REF =3, PORTRAIT_INV =5, LANDSCAPE =6, LANDSCAPE_INV =4, LANDSCAPE_REF =1, LANDSCAPE_INV_REF =7, PORTRAIT =0, PORTRAIT_REF =2, PORTRAIT_INV_REF =3, PORTRAIT_INV =5, LANDSCAPE =6, LANDSCAPE_INV =4, LANDSCAPE_REF =1, LANDSCAPE_INV_REF =7 } |
Orientation type. Specific orientation modes of the device. More... | |
Functions | |
void | TFT_Initialize (void) |
This function intializes the display controller and prepares it for any subsequent operations. More... | |
void | TFT_WriteCommand (unsigned char command) |
This function writes a command byte to the display controller. More... | |
void | TFT_WriteData (unsigned char datab) |
This function is used to write data to the TFT controller. More... | |
void | TFT_WriteDataWord (int wdata) |
This function writes a 16 bit word on the display controller registers. More... | |
void | TFT_RamAdress (void) |
void | TFT_SetPixel (unsigned char x_start, unsigned char y_start, unsigned int color) |
This functions sets a specific pixel on the TFT display. More... | |
void | TFT_Sleep (void) |
Puts the display in a low power mode. More... | |
void | TFT_WakeUp (void) |
Wakes the display from sleep mode. More... | |
void | TFT_TurnOffDisplay (void) |
Blanks out the display. More... | |
void | TFT_TurnOnDisplay (void) |
This function turns on the display from idle mode. More... | |
void | TFT_SetOrientation (orientation_t mode) |
Sets the display text orientation. Mirrored modes are also supported on top of portrait and landscape modes. More... | |
void | TFT_InvertDisplay (void) |
Enables color inversion on the display. More... | |
void | TFT_InvertDisplayOff (void) |
Disables color inversion on the display. More... | |
void | TFT_Background (int color) |
This function paints the display background a specific color. More... | |
void | TFT_ShowPic (unsigned int picture[], unsigned char width, unsigned char height, unsigned int x, unsigned int y) |
This function paints an image with a specific heigh and width on the display at a specific coordinate. More... | |
void | TFT_DisplayImage (Image_t *image, unsigned char x, unsigned char y) |
This function displays an image of type Image_t on screen. More... | |
unsigned int | TFT_Color565 (unsigned char r, unsigned char g, unsigned char b) |
Pass 8-bit (each) R,G,B, get back 16-bit packed color. More... | |
void | TFT_ASCII (char x, char y, int color, int background, char letter, char size) |
Plot an ASCII char on the display. A specific font is used. More... | |
void | TFT_PrintString (char x, char y, int color, int background, char *message, char size) |
Orint a colored string at coordinates x,y with a specific font size. More... | |
void | TFT_PrintInteger (char x, char y, int color, int background, int integer, char size) |
Prints an integer at coordinates x,y with a specific color on a specific background. The integer font size is deterined bu var size. More... | |
#define BLUE 0x001f /** Blue color. */ |
#define CS_HIGH | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_24, HIGH); |
#define CS_LOW | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_24, LOW); |
#define CS_OUTPUT | ( | ) | bcm2835_gpio_fsel(RPI_V2_GPIO_P1_24,BCM2835_GPIO_FSEL_OUTP); |
#define DC_HIGH | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_22, HIGH); |
#define DC_LOW | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_22, LOW); |
#define DC_OUTPUT | ( | ) | bcm2835_gpio_fsel(RPI_V2_GPIO_P1_22,BCM2835_GPIO_FSEL_OUTP); |
#define GREEN 0x07e0 /** Green color. */ |
#define RED 0xf800 /** Red color. */ |
#define RST_HIGH | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_16, HIGH); |
#define RST_LOW | ( | ) | bcm2835_gpio_write(RPI_V2_GPIO_P1_16, LOW); |
#define RST_OUTPUT | ( | ) | bcm2835_gpio_fsel(RPI_V2_GPIO_P1_16,BCM2835_GPIO_FSEL_OUTP); |
#define WHITE 0xffff /** White color. */ |
enum orientation_t |
Orientation type. Specific orientation modes of the device.