Microchip® Advanced Software Framework

demo_draw_bmpfile.c File Reference

Functions for drawing bitmaps through FatFS.

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

#include <asf.h>
#include "ff.h"
#include "demo.h"
#include "string.h"

Data Structures

struct  bmpfile_header
 

Macros

#define FF_BUFF_SIZE   1536
 FatFS read buffer size. More...
 

Functions

static void demo_draw_bmpfile (struct gfx_bitmap const *bmp, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y)
 Draw bmp file read from FatFS. More...
 
uint8_t demo_draw_bmpfile_init (void)
 Initialize FatFS and draw interface. More...
 

Variables

static uint8_t demo_bmp_filedata [FF_BUFF_SIZE]
 Bitmap buffer read from file. More...
 

#define FF_BUFF_SIZE   1536

FatFS read buffer size.

Referenced by demo_draw_bmpfile().

static void demo_draw_bmpfile ( struct gfx_bitmap const *  bmp,
gfx_coord_t  map_x,
gfx_coord_t  map_y,
gfx_coord_t  x,
gfx_coord_t  y 
)
static
uint8_t demo_draw_bmpfile_init ( void  )

Initialize FatFS and draw interface.

References demo_draw_bmpfile(), f_mkfs(), f_mount(), f_opendir(), FR_NO_FILESYSTEM, FR_OK, fs, gfx_set_ext_handler(), and LUN_ID_0.

Referenced by main().

uint8_t demo_bmp_filedata[FF_BUFF_SIZE]
static

Bitmap buffer read from file.

Referenced by demo_draw_bmpfile().