Contiki 2.6

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

Detailed Description

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

*********************************************************

Definition in file avr_flash.c.