BeRTOS
hw_dataflash.c
Go to the documentation of this file.
00001 
00038 #include "hw/hw_dataflash.h"
00039 
00040 #include <cfg/compiler.h>
00041 #include <cfg/module.h>
00042 #include <cfg/macros.h>
00043 
00044 #warning TODO:This is an example implementation, you must implement it!
00045 
00046 MOD_DEFINE(hw_dataflash);
00047 
00056 void dataflash_hw_init(void)
00057 {
00058 
00059     //Disable CS line (remove if not needed)
00060     dataflash_hw_setCS(false);
00061 
00062     /*
00063      * Put here your code!
00064      *
00065      * Note:
00066      * - if you drive manualy CS line, here init a CS pin
00067      * - if you use a dedicated reset line, here init a reset pin
00068      */
00069 
00070     MOD_INIT(hw_dataflash);
00071 }
00072 
00081 void dataflash_hw_setCS(bool enable)
00082 {
00083     if (enable)
00084     {
00085         /*
00086          * Put here your code to enable
00087          * dataflash memory
00088          */
00089     }
00090     else
00091     {
00092         /*
00093          * Put here your code to disable
00094          * dataflash memory
00095          */
00096     }
00097 }
00098 
00108 void dataflash_hw_setReset(bool enable)
00109 {
00110     if (enable)
00111     {
00112         /*
00113          * Put here your code to set reset of
00114          * dataflash memory
00115          */
00116     }
00117     else
00118     {
00119         /*
00120          * Put here your code to clear reset of
00121          * dataflash memory
00122          */
00123     }
00124 }
00125