#include <stddef.h>
#include "board.h"
#include "sdramc.h"
#include "navigation.h"
#include "file.h"
#include "spi.h"
#include "at45dbx.h"
#include "conf_at45dbx.h"
#include "conf_audio_player.h"
#include "gpio.h"
#include "et024006dhu.h"
#include "sdram_loader.h"
Data Structures | |
struct | bm_file_header_s |
File header of a bitmap file. 14 bytes long, little endian representation and packed. See bitmap specification for more details. More... | |
struct | bm_info_header_s |
Bitmap file information header. More... | |
Macros | |
#define | AT45DBX_ENABLE_NPCS_PIN(NPCS, unused) {AT45DBX_SPI_NPCS##NPCS##_PIN, AT45DBX_SPI_NPCS##NPCS##_FUNCTION}, |
#define | DATAFLASH_DISK_ID 1 |
#define | DATAFLASH_NAV_ID 0 |
Typedefs | |
typedef struct bm_file_header_s | bm_file_header_t |
File header of a bitmap file. 14 bytes long, little endian representation and packed. See bitmap specification for more details. More... | |
typedef struct bm_info_header_s | bm_info_header_t |
Bitmap file information header. More... | |
Functions | |
void | ascii2unicode (char *deststr, const char *srcstr, size_t strlen) |
static void | at45dbx_resources_init (void) |
Initializes AT45DBX resources: GPIO, SPI and AT45DBX. More... | |
void | bm_get_info (bm_file_header_t *bf, bm_info_header_t *bi) |
void | load_sdram_data (int hsb_hz) |
void | swap_endian_blk (unsigned char *pblock, int size) |
Swaps a block of data to the other endian representation. More... | |
Variables | |
ram_file_t | ram_files [NUMBER_OF_IMAGES] |
mspace | sdram_mspace |
#define AT45DBX_ENABLE_NPCS_PIN | ( | NPCS, | |
unused | |||
) | {AT45DBX_SPI_NPCS##NPCS##_PIN, AT45DBX_SPI_NPCS##NPCS##_FUNCTION}, |
Referenced by at45dbx_resources_init().
#define DATAFLASH_DISK_ID 1 |
#define DATAFLASH_NAV_ID 0 |
Referenced by load_sdram_data().
typedef struct bm_file_header_s bm_file_header_t |
File header of a bitmap file. 14 bytes long, little endian representation and packed. See bitmap specification for more details.
typedef struct bm_info_header_s bm_info_header_t |
Bitmap file information header.
Starts after the file header and is 40 bytes long, in little endian and packed.
void ascii2unicode | ( | char * | deststr, |
const char * | srcstr, | ||
size_t | strlen | ||
) |
|
static |
Initializes AT45DBX resources: GPIO, SPI and AT45DBX.
References AT45DBX_ENABLE_NPCS_PIN, at45dbx_init(), AT45DBX_MEM_CNT, AT45DBX_SPI, AT45DBX_SPI_BITS, AT45DBX_SPI_FIRST_NPCS, AT45DBX_SPI_MASTER_SPEED, AT45DBX_SPI_MISO_FUNCTION, AT45DBX_SPI_MISO_PIN, AT45DBX_SPI_MOSI_FUNCTION, AT45DBX_SPI_MOSI_PIN, AT45DBX_SPI_SCK_FUNCTION, AT45DBX_SPI_SCK_PIN, FPBA_HZ, gpio_enable_module(), MREPEAT(), spi_options_t::reg, spi_enable(), spi_initMaster(), and spi_selectionMode().
Referenced by load_sdram_data().
void bm_get_info | ( | bm_file_header_t * | bf, |
bm_info_header_t * | bi | ||
) |
References file_read_buf(), and swap_endian_blk().
Referenced by load_sdram_data().
void load_sdram_data | ( | int | hsb_hz | ) |
References at45dbx_resources_init(), AT45DBX_SPI_NPCS0_PIN, bm_file_header_s::bfOffBits, bm_info_header_s::biHeight, bm_info_header_s::biSizeImage, bm_info_header_s::biWidth, bm_get_info(), cpu_delay_ms(), create_mspace_with_base(), DATAFLASH_NAV_ID, et024006_PrintConsole(), FCPU_HZ, file_close(), file_open(), file_read_buf(), file_seek(), FOPEN_MODE_R, FS_SEEK_SET, gpio_enable_gpio_pin(), MEM_SPACE_SIZE, mspace_malloc(), ram_file_t::name, name, nav_drive_nb(), nav_drive_set(), nav_partition_mount(), nav_reset(), nav_select(), nav_setcwd(), ram_files, RED, sdram_mspace, SDRAM_START_ADDRESS, sdramc_init(), and ram_file_t::start_addr.
Referenced by gui_init().
void swap_endian_blk | ( | unsigned char * | pblock, |
int | size | ||
) |
Swaps a block of data to the other endian representation.
pblock | Pointer to the first byte of the data block |
size | Size of the data bock in bytes |
Referenced by bm_get_info().
ram_file_t ram_files[NUMBER_OF_IMAGES] |
Referenced by clear_in_progress(), draw_background(), draw_config(), draw_config_view_print_cursor(), draw_config_view_print_repeat(), draw_config_view_print_shuffle(), draw_cover_art(), draw_device_not_present(), draw_device_not_supported(), draw_device_present(), draw_file_list(), draw_in_progress(), draw_navigation(), draw_pause_button(), draw_play_button(), draw_play_view(), draw_play_view_print_artist(), draw_play_view_print_file(), draw_play_view_print_title(), draw_play_view_print_total_time(), draw_playtime_update(), draw_song_progress_bar(), draw_startup(), draw_volume_bar(), and load_sdram_data().
mspace sdram_mspace |
Referenced by jpeg_free_large(), jpeg_free_small(), jpeg_get_large(), jpeg_get_small(), jpeg_lib_exit(), jpeg_lib_init(), and load_sdram_data().