Microchip® Advanced Software Framework

ili9341_example.c File Reference

ILI9341 display controller component driver Example.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>

Macros

#define BG_COLOR   ILI9341_COLOR(0, 0, 0)
 Display background color when clearing the display. More...
 
#define COLOR_TABLE_SIZE   (sizeof(color_table) / sizeof(color_table[0]))
 Number of colors stored in the color_table array. More...
 
#define TOTAL_PIXELS   ((uint32_t)ILI9341_DEFAULT_WIDTH * ILI9341_DEFAULT_HEIGHT)
 Number of pixels for full screen. More...
 

Functions

int main (void)
 Main application. More...
 

Variables

ili9341_color_t bitmap [1600]
 Create an array to hold a 40 x 40 bitmap. More...
 
uint16_t bitmap_ptr = 0
 Pointer to the location in the array. More...
 
const ili9341_color_t color_table []
 Table of primary and secondary display pixel colors. More...
 

#define BG_COLOR   ILI9341_COLOR(0, 0, 0)

Display background color when clearing the display.

Referenced by main().

#define COLOR_TABLE_SIZE   (sizeof(color_table) / sizeof(color_table[0]))

Number of colors stored in the color_table array.

Referenced by main().

#define TOTAL_PIXELS   ((uint32_t)ILI9341_DEFAULT_WIDTH * ILI9341_DEFAULT_HEIGHT)

Number of pixels for full screen.

Referenced by main().

ili9341_color_t bitmap[1600]

Create an array to hold a 40 x 40 bitmap.

Referenced by main().

uint16_t bitmap_ptr = 0

Pointer to the location in the array.

Referenced by main().

const ili9341_color_t color_table[]
Initial value:
= {
ILI9341_COLOR(0, 0, 255), ILI9341_COLOR(0, 255, 0),
ILI9341_COLOR(255, 0, 0), ILI9341_COLOR(255, 255, 0),
ILI9341_COLOR(255, 0, 255), ILI9341_COLOR(0, 255, 255)
}
#define ILI9341_COLOR(r, g, b)
This macro generates a 16-bit native color for the display from a 24-bit RGB value.
Definition: ili9341.h:98

Table of primary and secondary display pixel colors.

Referenced by main().