CANopenADI
CANopenNode on Analog Devices Inc. MAX32xxx microcontrollers
Loading...
Searching...
No Matches
CO_storageBlank.h
1/*
2 * CANopen data storage object (blank example)
3 *
4 * @file CO_storageBlank.h
5 * @author Janez Paternoster
6 * @copyright 2021 Janez Paternoster
7 *
8 * This file is part of CANopenNode, an opensource CANopen Stack.
9 * Project home page is <https://github.com/CANopenNode/CANopenNode>.
10 * For more information on CANopen see <http://www.can-cia.org/>.
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 */
24
25#ifndef CO_STORAGE_BLANK_H
26#define CO_STORAGE_BLANK_H
27
28#include "storage/CO_storage.h"
29
30#if ((CO_CONFIG_STORAGE) & CO_CONFIG_STORAGE_ENABLE) || defined CO_DOXYGEN
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/* This is very basic example of implementing (object dictionary) data storage.
37 * Data storage is target specific. CO_storageBlank.h and .c files only shows
38 * the basic principle, but does nothing. For complete example of storage see:
39 * - CANopenPIC/PIC32 uses eeprom with CANopenNode/storage/CO_storage.h/.c,
40 * CANopenNode/storage/CO_storageEeprom.h/.c, CANopenNode/storage/CO_eeprom.h
41 * and CANopenPIC/PIC32/CO_eepromPIC32.c files.
42 * - CANopenLinux uses file system with CANopenNode/storage/CO_storage.h/.c and
43 * CANopenLinux/CO_storageLinux.h files.
44 */
45
46CO_ReturnError_t CO_storageBlank_init(CO_storage_t *storage,
47 CO_CANmodule_t *CANmodule,
48 OD_entry_t *OD_1010_StoreParameters,
49 OD_entry_t *OD_1011_RestoreDefaultParam,
50 CO_storage_entry_t *entries,
51 uint8_t entriesCount,
52 uint32_t *storageInitError);
53
54uint32_t CO_storageBlank_auto_process(CO_storage_t *storage,
55 bool_t closeFiles);
56
57#ifdef __cplusplus
58}
59#endif /* __cplusplus */
60
61#endif /* (CO_CONFIG_STORAGE) & CO_CONFIG_STORAGE_ENABLE */
62
63#endif /* CO_STORAGE_BLANK_H */
unsigned long int uint32_t
uint_fast8_t bool_t
unsigned char uint8_t
CO_ReturnError_t