VSF Documented
|
Macros | |
#define | UNUSED(x) (void)(x) /* macro to get rid of 'unused parameter' warning */ |
#define | MPS2_FPGAIO_PORT MPS2_FPGAIO |
#define | MPS2_SSP_PORT MPS2_SSP0 |
#define | PIN_CS (1ul << 0) |
#define | TFE 0x01 |
#define | RNE 0x04 |
#define | BSY 0x10 |
#define | LCD_CS(x) ((x) ? (MPS2_FPGAIO_PORT->MISC |= PIN_CS) : (MPS2_FPGAIO->MISC &= ~PIN_CS)) |
#define | SPI_START (0x70) /* Start byte for SPI transfer */ |
#define | SPI_RD (0x01) /* WR bit 1 within start */ |
#define | SPI_WR (0x00) /* WR bit 0 within start */ |
#define | SPI_DATA (0x02) /* RS bit 1 within start byte */ |
#define | SPI_INDEX (0x00) /* RS bit 0 within start byte */ |
Functions | |
int32_t | GLCD_Initialize (void) |
Initialize Graphic LCD (HX8347-D LCD Controller) | |
int32_t | GLCD_Uninitialize (void) |
De-initialize Graphic LCD. | |
int32_t | GLCD_SetForegroundColor (uint32_t color) |
Set foreground color. | |
int32_t | GLCD_SetBackgroundColor (uint32_t color) |
Set background color. | |
int32_t | GLCD_ClearScreen (void) |
Clear screen (with active background color) | |
int32_t | GLCD_SetFont (GLCD_FONT *font) |
Set active font. | |
int32_t | GLCD_DrawPixel (uint32_t x, uint32_t y) |
Draw pixel (in active foreground color) | |
int32_t | GLCD_DrawHLine (uint32_t x, uint32_t y, uint32_t length) |
Draw horizontal line (in active foreground color) | |
int32_t | GLCD_DrawVLine (uint32_t x, uint32_t y, uint32_t length) |
Draw vertical line (in active foreground color) | |
int32_t | GLCD_DrawRectangle (uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
Draw rectangle (in active foreground color) | |
int32_t | GLCD_DrawChar (uint32_t x, uint32_t y, int32_t ch) |
Draw character (in active foreground color) | |
int32_t | GLCD_DrawString (uint32_t x, uint32_t y, const char *str) |
Draw string (in active foreground color) | |
int32_t | GLCD_DrawBargraph (uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t val) |
Draw bargraph (in active foreground color) | |
int32_t | GLCD_DrawBitmap (uint32_t x, uint32_t y, uint32_t width, uint32_t height, const uint8_t *bitmap) |
Draw bitmap (bitmap from BMP file without header) | |
int32_t | GLCD_VScroll (uint32_t dy) |
Scroll picture on display vertically. | |
int32_t | GLCD_FrameBufferAccess (bool enable) |
Enable or disable direct access to FrameBuffer. | |
uint32_t | GLCD_FrameBufferAddress (void) |
Retrieve FrameBuffer address. | |
#define UNUSED | ( | x | ) | (void)(x) /* macro to get rid of 'unused parameter' warning */ |
#define MPS2_FPGAIO_PORT MPS2_FPGAIO |
#define MPS2_SSP_PORT MPS2_SSP0 |
#define PIN_CS (1ul << 0) |
#define TFE 0x01 |
#define RNE 0x04 |
#define BSY 0x10 |
#define LCD_CS | ( | x | ) | ((x) ? (MPS2_FPGAIO_PORT->MISC |= PIN_CS) : (MPS2_FPGAIO->MISC &= ~PIN_CS)) |
#define SPI_START (0x70) /* Start byte for SPI transfer */ |
#define SPI_RD (0x01) /* WR bit 1 within start */ |
#define SPI_WR (0x00) /* WR bit 0 within start */ |
#define SPI_DATA (0x02) /* RS bit 1 within start byte */ |
#define SPI_INDEX (0x00) /* RS bit 0 within start byte */ |
int32_t GLCD_Initialize | ( | void | ) |
Initialize Graphic LCD (HX8347-D LCD Controller)
int32_t GLCD_Uninitialize | ( | void | ) |
De-initialize Graphic LCD.
Set foreground color.
[in] | color | Color value |
Set background color.
[in] | color | Color value |
int32_t GLCD_ClearScreen | ( | void | ) |
Clear screen (with active background color)
int32_t GLCD_SetFont | ( | GLCD_FONT * | font | ) |
Set active font.
[in] | font | Pointer to font structure |
Draw pixel (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
Draw horizontal line (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | length | Line length |
Draw vertical line (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | length | Line length in pixels |
Draw rectangle (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Rectangle width in pixels |
[in] | height | Rectangle height in pixels |
Draw character (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
[in] | ch | Character |
Draw string (in active foreground color)
[in] | x | x position in pixels (0 = left corner) |
[in] | y | y position in pixels (0 = upper corner) |
[in] | str | Null-terminated String |
Draw bargraph (in active foreground color)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Full bargraph width in pixels |
[in] | height | Full bargraph height in pixels |
[in] | val | Active bargraph value (maximum value is 100) |
int32_t GLCD_DrawBitmap | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | width, | ||
uint32_t | height, | ||
const uint8_t * | bitmap | ||
) |
Draw bitmap (bitmap from BMP file without header)
[in] | x | Start x position in pixels (0 = left corner) |
[in] | y | Start y position in pixels (0 = upper corner) |
[in] | width | Bitmap width in pixels |
[in] | height | Bitmap height in pixels |
[in] | bitmap | Bitmap data |
Scroll picture on display vertically.
[in] | dy | Scroll size in pixels |
Enable or disable direct access to FrameBuffer.
[in] | enable | Enable or disable request
|
uint32_t GLCD_FrameBufferAddress | ( | void | ) |
Retrieve FrameBuffer address.