@@ -44,25 +44,10 @@ extern "C" {
4444int8_t mtd_start (void );
4545
4646/**
47- * @brief Saves any value in any position of mtd_storage.
47+ * @brief removes all content in the mtd_Storage
4848 *
49- * @param [in] value Any type of value.
50- * @param [in] len size of @p value that will be saved.
51- * @param [in] offset reference to an position in mtd_storage.
5249 * @return int8_t
5350 */
54- int mtd_save (const void * value , uint32_t len , uint32_t offset );
55-
56- /**
57- * @brief Loads any value in any position of mtd_storage.
58- *
59- * @param [out] value Any type of value.
60- * @param [in] len size of @p value that will be loaded.
61- * @param [in] offset reference to an position in mtd_storage.
62- * @return int8_t
63- */
64- int mtd_load (void * value , uint16_t len , uint32_t offset );
65-
6651int8_t mtd_erase_all (void );
6752
6853/**
@@ -93,47 +78,47 @@ int8_t mtd_dump_flashpage(uint16_t page);
9378 * @param [in] key An unique identifier string for the uint8_t data @p value.
9479 * @return int
9580 */
96- int mtd_put_u8 (const uint8_t value , const uint8_t * key );
81+ int mtd_put_u8 (const uint8_t value , const char * key );
9782/**
9883 * @brief Saves an unsigned int 16 bits data type in the mtd_storage.
9984 *
10085 * @param [in] value uint16_t data.
10186 * @param [in] key An unique identifier string for the uint16_t data @p value.
10287 * @return int
10388 */
104- int mtd_put_u16 (const uint16_t value , const uint8_t * key );
89+ int mtd_put_u16 (const uint16_t value , const char * key );
10590/**
10691 * @brief Saves an unsigned int 32 bits data type in the mtd_storage.
10792 *
10893 * @param [in] value uint32_t data.
10994 * @param [in] key An unique identifier string for the uint32_t data @p value.
11095 * @return int
11196 */
112- int mtd_put_u32 (const uint32_t value , const uint8_t * key );
97+ int mtd_put_u32 (const uint32_t value , const char * key );
11398/**
11499 * @brief Load an unsigned int 8 bits data type in the mtd_storage
115100 *
116101 * @param [out] value uint8_t data variable that will load the value from mtd_storage
117102 * @param [in] key An unique identifier string for the uint8_t data @p value.
118103 * @return int
119104 */
120- int mtd_get_u8 (uint8_t * value , const uint8_t * key );
105+ int mtd_get_u8 (uint8_t * value , const char * key );
121106/**
122107 * @brief Load an unsigned int 16 bits data type in the mtd_storage
123108 *
124109 * @param [out] value uint16_t data variable that will load the value from mtd_storage
125110 * @param [in] key An unique identifier string for the uint16_t data @p value.
126111 * @return int
127112 */
128- int mtd_get_u16 (uint16_t * value , const uint8_t * key );
113+ int mtd_get_u16 (uint16_t * value , const char * key );
129114/**
130115 * @brief Load an unsigned int 32 bits data type in the mtd_storage
131116 *
132117 * @param [out] value uint32_t data variable that will load the value from mtd_storage
133118 * @param [in] key An unique identifier string for the uint32_t data @p value.
134119 * @return int
135120 */
136- int mtd_get_u32 (uint32_t * value , const uint8_t * key );
121+ int mtd_get_u32 (uint32_t * value , const char * key );
137122
138123/* Int put/set operations */
139124
@@ -144,47 +129,47 @@ int mtd_get_u32(uint32_t *value, const uint8_t *key);
144129 * @param [in] key An unique identifier string for the int8_t data @p value.
145130 * @return int
146131 */
147- int mtd_put_i8 (const int8_t value , const uint8_t * key );
132+ int mtd_put_i8 (const int8_t value , const char * key );
148133/**
149134 * @brief Saves an signed int 16 bits data type in the mtd_storage.
150135 *
151136 * @param [in] value uint16_t data.
152137 * @param [in] key An unique identifier string for the uint16_t data @p value.
153138 * @return int
154139 */
155- int mtd_put_i16 (const int16_t value , const uint8_t * key );
140+ int mtd_put_i16 (const int16_t value , const char * key );
156141/**
157142 * @brief Saves an signed int 32 bits data type in the mtd_storage.
158143 *
159144 * @param [in] value uint32_t data.
160145 * @param [in] key An unique identifier string for the uint32_t data @p value.
161146 * @return int
162147 */
163- int mtd_put_i32 (const int32_t value , const uint8_t * key );
148+ int mtd_put_i32 (const int32_t value , const char * key );
164149/**
165150 * @brief Load an signed int 8 bits data type in the mtd_storage
166151 *
167152 * @param [out] value int8_t data variable that will load the value from mtd_storage
168153 * @param [in] key An unique identifier string for the int8_t data @p value.
169154 * @return int
170155 */
171- int mtd_get_i8 (int8_t * value , const uint8_t * key );
156+ int mtd_get_i8 (int8_t * value , const char * key );
172157/**
173158 * @brief Load an unsigned int 16 bits data type in the mtd_storage
174159 *
175160 * @param [out] value int16_t data variable that will load the value from mtd_storage
176161 * @param [in] key An unique identifier string for the int16_t data @p value.
177162 * @return int
178163 */
179- int mtd_get_i16 (int16_t * value , const uint8_t * key );
164+ int mtd_get_i16 (int16_t * value , const char * key );
180165/**
181166 * @brief Load an unsigned int 32 bits data type in the mtd_storage
182167 *
183168 * @param [out] value uint32_t data variable that will load the value from mtd_storage
184169 * @param [in] key An unique identifier string for the uint32_t data @p value.
185170 * @return int
186171 */
187- int mtd_get_i32 (int32_t * value , const uint8_t * key );
172+ int mtd_get_i32 (int32_t * value , const char * key );
188173
189174/* String put/set operations */
190175
@@ -197,7 +182,7 @@ int mtd_get_i32(int32_t *value, const uint8_t *key);
197182 * @param [in] len size of @p value string.
198183 * @return int
199184 */
200- int mtd_put_str (const char * value , const uint8_t * key , uint8_t len );
185+ int mtd_put_str (const char * value , const char * key , uint8_t len );
201186/**
202187 * @brief Loads a string using its identifier.
203188 *
@@ -206,7 +191,7 @@ int mtd_put_str(const char *value, const uint8_t *key, uint8_t len);
206191 * @param [in] len size of @p value string.
207192 * @return int
208193 */
209- int mtd_get_str (char * value , const uint8_t * key , uint8_t len );
194+ int mtd_get_str (char * value , const char * key , uint8_t len );
210195
211196#ifdef __cplusplus
212197}
0 commit comments