BeRTOS
Functions
dataflash_hwtest.c File Reference

DataFlash test. More...

#include "hw/hw_dataflash.h"
#include "cfg/cfg_dataflash.h"
#include "cfg/cfg_proc.h"
#include <cfg/test.h>
#include <cfg/debug.h>
#include <cfg/module.h>
#include <cfg/log.h>
#include <drv/timer.h>
#include <drv/ser.h>
#include <drv/dataflash.h>
#include <kern/proc.h>
#include <io/kfile.h>
#include <string.h>

Go to the source code of this file.

Functions

int dataflash_testSetup (void)
 Setup all needed to test dataflash memory.
int dataflash_testRun (void)
 Run dataflash test memory.
int dataflash_testTearDown (void)
 End a dataflash Test.

Detailed Description

DataFlash test.

This module test the dataflash memory among the supported memory (see drv/dataflash.h for more detail). To test memory we fill one buffer with casual char, and write it in different part of memory. After every write we read the data that we have been write and compare this with test buffer, checking if write and read command work correclty. We also check if driver work properly when we make a write out the limit of memory size.

Note: dataflash driver use a kfile interface, so for write/read test we use a kfile_test module that perform some generic test.

Author:
Daniele Basile <asterix@develer.com>

Definition in file dataflash_hwtest.c.


Function Documentation

int dataflash_testRun ( void  )

Run dataflash test memory.

Definition at line 170 of file dataflash_hwtest.c.

int dataflash_testSetup ( void  )

Setup all needed to test dataflash memory.

To test data falsh drive you could use this functions.

Definition at line 110 of file dataflash_hwtest.c.

int dataflash_testTearDown ( void  )

End a dataflash Test.

(Unused)

Definition at line 192 of file dataflash_hwtest.c.