X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fhw%2Fhw_dataflash.c;h=1a758a869561d10e183ff3d1577d6e20c9faffc1;hb=751e0228258e4c9e738fdcbfd43e45cdf873a553;hp=d802d0d7498fc220ba867fd1bde863432355186c;hpb=5d340609f2820fb1c909019f254fceefafef3fd4;p=bertos.git diff --git a/bertos/hw/hw_dataflash.c b/bertos/hw/hw_dataflash.c index d802d0d7..1a758a86 100644 --- a/bertos/hw/hw_dataflash.c +++ b/bertos/hw/hw_dataflash.c @@ -1,24 +1,47 @@ /** * \file * * * \brief Dataflash HW control routines. * - * \version $Id$ * \author Francesco Sacchi */ -#include "hw_dataflash.h" +#include "hw/hw_dataflash.h" #include #include #include -#include - +#warning TODO:This is an example implementation, you must implement it! MOD_DEFINE(hw_dataflash); @@ -32,6 +55,7 @@ MOD_DEFINE(hw_dataflash); */ void dataflash_hw_init(void) { + //Disable CS line (remove if not needed) dataflash_hw_setCS(false); @@ -57,15 +81,19 @@ void dataflash_hw_init(void) void dataflash_hw_setCS(bool enable) { if (enable) + { /* * Put here your code to enable * dataflash memory */ + } else + { /* * Put here your code to disable * dataflash memory */ + } } /** @@ -73,16 +101,25 @@ void dataflash_hw_setCS(bool enable) * * This function provide to send reset signal to * dataflash memory. You must impement it comly to a dataflash - * memory datasheet that describe a reset procedure for select - * device. + * memory datasheet to allow the drive to set a reset pin + * when \p enable flag is true, and disable it when is false. * */ -void dataflash_hw_reset(void) +void dataflash_hw_setReset(bool enable) { - /* - * Put here your code to reset - * data flash memory - */ - + if (enable) + { + /* + * Put here your code to set reset of + * dataflash memory + */ + } + else + { + /* + * Put here your code to clear reset of + * dataflash memory + */ + } }