Management of the virtual memory.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
#include "conf_access.h"
#include "conf_virtual_mem.h"
#include "virtual_mem.h"
#include <string.h>
#include "udi_msc.h"
Functions | |
Ctrl_status | virtual_mem_2_ram (uint32_t addr, void *ram) |
This function transfers 1 data sector from memory to RAM sector = 512 bytes. More... | |
Ctrl_status | virtual_ram_2_mem (uint32_t addr, const void *ram) |
This function transfers 1 data sector from memory to RAM sector = 512 bytes. More... | |
Ctrl_status | virtual_read_capacity (uint32_t *uint32_t_nb_sector) |
This function returns the address of the last valid sector. More... | |
bool | virtual_removal (void) |
This function informs about the memory type. More... | |
Ctrl_status | virtual_test_unit_ready (void) |
This function tests memory state, and starts memory initialization. More... | |
bool | virtual_unload (bool unload) |
This function unloads/loads the memory. More... | |
Ctrl_status | virtual_usb_read_10 (uint32_t addr, uint16_t nb_sector) |
This function transfers the memory data to the USB MSC interface. More... | |
static Ctrl_status | virtual_usb_trans (uint32_t addr, uint16_t nb_sector, bool b_read) |
This function transfers the data between memory and USB MSC interface. More... | |
Ctrl_status | virtual_usb_write_10 (uint32_t addr, uint16_t nb_sector) |
This function transfers the USB MSC data to the memory. More... | |
bool | virtual_wr_protect (void) |
This function returns the write-protected mode. More... | |
Variables | |
static bool | b_vmem_unloaded = false |
static COMPILER_WORD_ALIGNED uint8_t | vmem_data [VMEM_NB_SECTOR *VMEM_SECTOR_SIZE] |