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