Microchip® Advanced Software Framework

et024006dhu.h File Reference
#include <stdint.h>
#include <stdbool.h>

Macros

#define BLACK   0x0000
 
#define BLUE   0x001F
 
#define BLUE_LEV(level)   ( (level)&BLUE )
 
#define ET024006_BITMAP_WIDTH(width)   Align_up(width/8, 8)
 
#define ET024006_HEIGHT   240
 
#define ET024006_IFACE_MODE_EBI   0
 
#define ET024006_IFACE_MODE_SPI   1
 
#define ET024006_WIDTH   320
 
#define GRAY_LEV(level)   ( BLUE_LEV(level) | GREEN_LEV(level) | RED_LEV(level) )
 
#define GREEN   0x07E0
 
#define GREEN_LEV(level)   ( (((level)*2)<<5)&GREEN )
 
#define RED   0xF800
 
#define RED_LEV(level)   ( ((level)<<(5+6))&RED )
 
#define WHITE   0xFFFF
 

Typedefs

typedef uint16_t et024006_color_t
 Datatype color information. More...
 

Functions

et024006_color_t et024006_Color (uint8_t r, uint8_t g, uint8_t b)
 Converts a RGB 8:8:8 color to RGB 5:6:5. More...
 
void et024006_CopyPixelsFromScreen (et024006_color_t *pixels, uint32_t count)
 
void et024006_CopyPixelsToScreen (et024006_color_t const *pixels, uint32_t count)
 
void et024006_DrawBitmap (const uint16_t data[], uint16_t columnOffset, uint16_t rowOffset)
 
void et024006_DrawFilledCircle (uint16_t x, uint16_t y, uint16_t radius, uint16_t color, uint8_t quadrantMask)
 
void et024006_DrawFilledRect (uint16_t x, uint16_t y, uint16_t width, uint16_t height, et024006_color_t color)
 
void et024006_DrawHorizLine (uint16_t x, uint16_t y, uint16_t length, et024006_color_t color)
 
void et024006_DrawLine (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, et024006_color_t color)
 
void et024006_DrawPixel (uint16_t x, uint16_t y, et024006_color_t color)
 
void et024006_DrawQuickPixel (uint16_t x, uint16_t y, et024006_color_t color)
 
void et024006_DrawVertLine (uint16_t x, uint16_t y, uint16_t length, et024006_color_t color)
 
void et024006_DuplicatePixel (et024006_color_t color, uint32_t count)
 
void et024006_enter_idle (void)
 Make display enter in an idle mode. More...
 
et024006_color_t et024006_GetPixel (uint16_t x, uint16_t y)
 
void et024006_GetPixmap (et024006_color_t *pixmap, uint16_t map_width, uint16_t map_x, uint16_t map_y, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 
void et024006_Init (unsigned long cpu_hz, unsigned long hsb_hz)
 Initialize the TFT display. More...
 
void et024006_leave_idle (void)
 Make display leave the idle mode. More...
 
void et024006_PrintConsole (char *lcd_string, uint16_t fcolor, int bcolor)
 
void et024006_PrintString (char *lcd_string, const unsigned char *font_style, uint16_t x, uint16_t y, uint16_t fcolor, int bcolor)
 Writes a string to the display. More...
 
void et024006_PutBitmap (void *bitmap, uint16_t map_width, uint16_t x, uint16_t y, uint16_t width, uint16_t height, et024006_color_t foreground_color, et024006_color_t background_color)
 
void et024006_PutPixmap (et024006_color_t const *pixmap, uint16_t map_width, uint16_t map_x, uint16_t map_y, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 
void et024006_Scroll (int16_t lines)
 Scroll the scroll area down/up some lines. More...
 
void et024006_ScrollAreaSetup (uint16_t tfa, uint16_t vsa, uint16_t bfa)
 Configures a scroll area on the display. More...
 
void et024006_ScrollDisable (void)
 Disables the scrolling. More...
 
void et024006_ScrollEnable (void)
 Enables the scrolling feature. More...
 
void et024006_SetLimits (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Sets the display limits according to the corner coordinates. Writing to the display will result in writing to the area specified through this function. More...
 
void et024006_SetQuickLimits (uint16_t x, uint16_t y)
 Set the starting point of the next read/write from/to RAM. This sets only the start point of the RAM window. More...
 
void et024006_SetQuickLimits2 (uint16_t x, uint16_t y)
 Set the ending point of the next read/write from/to RAM. This sets only the end point of the RAM window. More...
 
int et024006_TestDisplay (void)
 Tests if a valid display is attached. For EBI connection it tests also the data lines. More...
 

Variables

const unsigned char FONT6x8 [97][8]
 
const unsigned char FONT8x16 [97][16]
 
const unsigned char FONT8x8 [97][8]