Microchip® Advanced Software Framework

task_gfx_no_touch.c File Reference

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.

Parameters
stack_depth_wordsTask stack size in 32 bits word.
task_priorityTask priority.

References gfx_init(), gfx_task(), NULL, and xTaskCreate.

Referenced by main().

static void gfx_draw_bmpfile ( const uint8_t *  bmpImage)
static

Draw a bitmap image.

Expected file format is 320x240, 24 bits, RGB888.

Parameters
bmpImagePointer 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 void gfx_init ( void  )
static

Initialize the LCD.

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
const portTickType gfx_refresh_rate = 1000UL / portTICK_RATE_MS
static

Referenced by gfx_task().

const portTickType instructions_delay = 50UL / portTICK_RATE_MS

Small delay to hold tasks, during instruction screen.

const portTickType presentation_delay = 2000UL / portTICK_RATE_MS
static

Referenced by gfx_task().