Microchip® Advanced Software Framework

flash.c File Reference
#include <stdio.h>
#include <stdint.h>
#include "contiki.h"
#include "dev/watchdog.h"
#include "flash.h"
#include "asf.h"
#include "nvm.h"

Macros

#define _DEBUG_   0
 
#define NVM_FLASH_END_D20J18   (0x0ul + 262144) /* 256kB flash */
 
#define NVM_PAGES   4096
 
#define NVM_PAGES_PER_ROW   4 /* erase only possible w row-granularity */
 
#define NVM_PAGESIZE   64 /* size of a page in flash, in bytes */
 
#define PRINTF(...)
 

Functions

void flash_clear (unsigned long addr)
 
void flash_done (void)
 
void flash_init (void)
 
uint16_t flash_read (unsigned long addr16)
 
void flash_setup (void)
 
void flash_write (unsigned long addr16, uint16_t data16)
 

#define _DEBUG_   0
#define NVM_FLASH_END_D20J18   (0x0ul + 262144) /* 256kB flash */

Referenced by flash_clear(), and flash_write().

#define NVM_PAGES   4096
#define NVM_PAGES_PER_ROW   4 /* erase only possible w row-granularity */
#define NVM_PAGESIZE   64 /* size of a page in flash, in bytes */

Referenced by flash_write().

#define PRINTF (   ...)

Referenced by flash_clear(), and flash_write().

void flash_clear ( unsigned long  addr)
void flash_done ( void  )
void flash_init ( void  )

References nvm_get_config_defaults(), and nvm_set_config().

Referenced by main().

uint16_t flash_read ( unsigned long  addr16)
void flash_setup ( void  )
void flash_write ( unsigned long  addr16,
uint16_t  data16 
)