Contiki 2.6

avr_flash.h File Reference

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

#include "conf_access.h"
#include "ctrl_status.h"
#include "usb_drv.h"

Go to the source code of this file.

Defines

#define ENTRY_SIZE   32
 FAT specification.

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.
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.
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_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.
bit avrf_read_sector (Uint16 nb_sector)
 This function is optimized and writes nb-sector * 512 Bytes from DataFlash memory to USB controller.
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.
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.h.