GFX task from the HTTP Netconn Example.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include "task_defs.h"
#include "logo_atmel.h"
#include <FreeRTOS.h>
#include <FreeRTOS_CLI.h>
#include <StackMacros.h>
#include <croutine.h>
#include <list.h>
#include <mpu_wrappers.h>
#include <portable.h>
#include <projdefs.h>
#include <queue.h>
#include <semphr.h>
#include <task.h>
#include <timers.h>
#include <pmc.h>
#include <sysclk.h>
#include "ili93xx.h"
#include "ili9325_regs.h"
#include "ili9341_regs.h"
#include "aat31xx.h"
#include "smc.h"
#include "ethernet.h"
Data Structures | |
struct | bmpfile_header |
Macros | |
#define | ILI93XX_LCD_CS 1 |
#define | IP_DHCP 2 |
#define | IP_FIXED 1 |
#define | IP_SELECTION IP_FIXED |
#define | IRQ_PRIOR_PIO 13 |
IRQ priority for PIO (The lower the value, the greater the priority) More... | |
Functions | |
void | create_gfx_task (uint16_t stack_depth_words, unsigned portBASE_TYPE task_priority) |
Create the GFX task. More... | |
static void | gfx_draw_bmpfile (const uint8_t *bmpImage) |
Draw a bitmap image. More... | |
static void | gfx_init (void) |
Initialize the LCD. More... | |
static void | gfx_task (void *pvParameters) |
GFX task core function. More... | |
Variables | |
uint32_t | app_hold = 1 |
Used to block the application on instruction screen. More... | |
int8_t | g_c_ipconfig [25] |
uint32_t | g_ip_mode = 0 |
static const portTickType | gfx_refresh_rate = 1000UL / portTICK_RATE_MS |
const portTickType | instructions_delay = 50UL / portTICK_RATE_MS |
Small delay to hold tasks, during instruction screen. More... | |
static const portTickType | presentation_delay = 2000UL / portTICK_RATE_MS |
#define ILI93XX_LCD_CS 1 |
#define IP_DHCP 2 |
#define IP_FIXED 1 |
#define IP_SELECTION IP_FIXED |
#define IRQ_PRIOR_PIO 13 |
IRQ priority for PIO (The lower the value, the greater the priority)
void create_gfx_task | ( | uint16_t | stack_depth_words, |
unsigned portBASE_TYPE | task_priority | ||
) |
Create the GFX task.
stack_depth_words | Task stack size in 32 bits word. |
task_priority | Task priority. |
References gfx_init(), gfx_task(), NULL, and xTaskCreate.
Referenced by main().
|
static |
Draw a bitmap image.
Expected file format is 320x240, 24 bits, RGB888.
bmpImage | Pointer to the bmp file image. |
References DEVICE_TYPE_ILI9325, DEVICE_TYPE_ILI9341, bmpfile_header::height, ILI9325_GRAM_DATA_REG, ILI9341_CMD_MEMORY_WRITE, ILI9341_CMD_WRITE_MEMORY_CONTINUE, ili93xx_device_type(), ili93xx_set_cursor_position(), ili93xx_set_window(), bmpfile_header::offset, and bmpfile_header::width.
Referenced by gfx_task().
|
static |
Initialize the LCD.
Referenced by create_gfx_task().
|
static |
GFX task core function.
pvParameters | Junk parameter. |
References AAT31XX_MAX_BACKLIGHT_LEVEL, AAT31XX_MIN_BACKLIGHT_LEVEL, aat31xx_set_backlight(), app_hold, COLOR_BLACK, COLOR_LIGHTGREY, COLOR_WHITE, g_c_ipconfig, gfx_draw_bmpfile(), gfx_refresh_rate, ili93xx_display_on(), ili93xx_draw_filled_rectangle(), ili93xx_draw_rectangle(), ili93xx_draw_string(), ILI93XX_LCD_HEIGHT, ILI93XX_LCD_WIDTH, ili93xx_set_cursor_position(), ili93xx_set_foreground_color(), init_ethernet(), logo_atmel_bmp, presentation_delay, and vTaskDelay().
Referenced by create_gfx_task().
uint32_t app_hold = 1 |
Used to block the application on instruction screen.
Referenced by gfx_task().
int8_t g_c_ipconfig[25] |
Referenced by gfx_task(), and status_callback().
uint32_t g_ip_mode = 0 |
Referenced by ethernet_configure_interface(), and status_callback().
|
static |
Referenced by gfx_task().
const portTickType instructions_delay = 50UL / portTICK_RATE_MS |
Small delay to hold tasks, during instruction screen.
|
static |
Referenced by gfx_task().