Add warning for not implemented functions.
[bertos.git] / bertos / hw / hw_dataflash.c
1 /**
2  * \file
3  * <!--
4  * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
5  * All Rights Reserved.
6  * -->
7  *
8  * \brief Dataflash HW control routines.
9  *
10  * \version $Id$
11  * \author Francesco Sacchi <batt@develer.com>
12  */
13
14 #include "hw_dataflash.h"
15
16 #include <cfg/compiler.h>
17 #include <cfg/module.h>
18 #include <cfg/macros.h>
19
20 #include <io/arm.h>
21
22
23 MOD_DEFINE(hw_dataflash);
24
25 /**
26  * Data flash init function.
27  *
28  * This function provide to initialize all that
29  * needs to drive a dataflash memory.
30  * Generaly needs to init pins to drive a CS line
31  * and reset line.
32  */
33 void dataflash_hw_init(void)
34 {
35         #warning The data flash init pins function is not implemented!
36
37     //Disable CS line (remove if not needed)
38         dataflash_hw_setCS(false);
39
40         /*
41          * Put here your code!
42          *
43          * Note:
44          * - if you drive manualy CS line, here init a CS pin
45          * - if you use a dedicated reset line, here init a reset pin
46          */
47
48         MOD_INIT(hw_dataflash);
49 }
50
51 /**
52  * Chip Select drive.
53  *
54  * This function enable or disable a CS line.
55  * You must implement this function comply to a dataflash
56  * memory datasheet to allow the drive to enable a memory
57  * when \p enable flag is true, and disable it when is false.
58  */
59 void dataflash_hw_setCS(bool enable)
60 {
61         #warning The data flash setCS function is not implemented!
62         if (enable)
63         {
64                 /*
65                  * Put here your code to enable
66                  * dataflash memory
67                  */
68         }
69         else
70         {
71                 /*
72                  * Put here your code to disable
73                  * dataflash memory
74                  */
75         }
76 }
77
78 /**
79  * Reset data flash memory.
80  *
81  * This function provide to send reset signal to
82  * dataflash memory. You must impement it comly to a dataflash
83  * memory datasheet to allow the drive to set a reset pin
84  * when \p enable flag is true, and disable it when is false.
85  *
86  */
87 void dataflash_hw_setReset(bool enable)
88 {
89         #warning The data flash setReset function is not implemented!
90         if (enable)
91         {
92                 /*
93                  * Put here your code to set reset of
94                  * dataflash memory
95                  */
96         }
97         else
98         {
99                 /*
100                  * Put here your code to clear reset of
101                  * dataflash memory
102                  */
103         }
104 }
105