X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fhw%2Fhw_dataflash.c;h=844dd9220ab6092b73abd40ca1b49de9528554db;hb=2325bd9b0caad4f1ef2a277a7c568dae53c3f7f3;hp=d802d0d7498fc220ba867fd1bde863432355186c;hpb=5d340609f2820fb1c909019f254fceefafef3fd4;p=bertos.git diff --git a/bertos/hw/hw_dataflash.c b/bertos/hw/hw_dataflash.c index d802d0d7..844dd922 100644 --- a/bertos/hw/hw_dataflash.c +++ b/bertos/hw/hw_dataflash.c @@ -1,6 +1,31 @@ /** * \file * @@ -11,14 +36,13 @@ * \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 +56,7 @@ MOD_DEFINE(hw_dataflash); */ void dataflash_hw_init(void) { + //Disable CS line (remove if not needed) dataflash_hw_setCS(false); @@ -57,15 +82,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 +102,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 + */ + } }