From: asterix Date: Tue, 13 May 2008 10:29:28 +0000 (+0000) Subject: Add setReset instead of reset function. Fix comments. X-Git-Tag: 1.0.0~3 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=cf51e69be8030631cc4b10b7760a853edc812f74;p=bertos.git Add setReset instead of reset function. Fix comments. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1249 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/hw/hw_dataflash.c b/bertos/hw/hw_dataflash.c index d802d0d7..1832f6ec 100644 --- a/bertos/hw/hw_dataflash.c +++ b/bertos/hw/hw_dataflash.c @@ -57,15 +57,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 +77,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 + */ + } } diff --git a/bertos/hw/hw_dataflash.h b/bertos/hw/hw_dataflash.h index aa726f1b..a0c697a0 100644 --- a/bertos/hw/hw_dataflash.h +++ b/bertos/hw/hw_dataflash.h @@ -18,5 +18,6 @@ void dataflash_hw_init(void); void dataflash_hw_setCS(bool enable); +void dataflash_hw_setReset(bool enable); #endif /* HW_DATAFLASH_H */