Contiki 2.5
Functions
avr_flash.c File Reference

This file writes/reads to/from flash memory internal to the AVR. More...

#include "config.h"
#include "storage/avr_flash.h"
#include <avr/pgmspace.h>
#include <avr/boot.h>

Go to the source code of this file.

Functions

void avrf_mem_init (void)
 This function initializes the hw/sw ressources required to drive the AVR Flash. More...
 
Ctrl_status avrf_test_unit_ready (void)
 This function tests the state of the AVR Flash. More...
 
Ctrl_status avrf_read_capacity (U32 *u32_nb_sector)
 This function gives the address of the last valid sector. More...
 
Bool avrf_wr_protect (void)
 This function returns the write protected status of the memory. More...
 
Bool avrf_removal (void)
 This function tells if the memory has been removed or not. More...
 
Ctrl_status avrf_read_10 (U32 addr, U16 nb_sector)
 This function performs a read operation of n sectors from a given address on. More...
 
Ctrl_status avrf_write_10 (U32 addr, U16 nb_sector)
 This fonction initialise the memory for a write operation. More...
 
bit avrf_read_open (Uint32 pos)
 This function opens a DF memory in read mode at a given sector address. More...
 
void avrf_read_close (void)
 This function unselects the current DF memory. More...
 
bit avrf_read_sector (Uint16 nb_sector)
 This function is optimized and writes nb-sector * 512 Bytes from DataFlash memory to USB controller. More...
 
bit avrf_write_open (Uint32 pos)
 This function opens a DF memory in write mode at a given sector address. More...
 
void avrf_write_close (void)
 This function fills the end of the logical sector (512B) and launch page programming. More...
 
bit avrf_write_sector (Uint16 nb_sector)
 This function is optimized and writes nb-sector * 512 Bytes from USB controller to DataFlash memory. More...
 
Ctrl_status avrf_usb_read ()
 This fonction transfer the memory data (programed in scsi_read_10) directly to the usb interface. More...
 
Ctrl_status avrf_usb_write (void)
 This fonction transfer the usb data (programed in scsi_write_10) directly to the memory data. More...
 

Detailed Description

This file writes/reads to/from flash memory internal to the AVR.


Definition in file avr_flash.c.