KETCube
Data Structures | Typedefs | Enumerations | Functions | Variables
ketCube_cfg.h File Reference

This file contains definitions for the KETCube configuration. More...

#include "ketCube_common.h"
#include "ketCube_eeprom.h"
#include "ketCube_compilation.h"
#include "ketCube_module_id.h"

Go to the source code of this file.

Data Structures

struct  ketCube_InterModMsg_t
 KETCube inter-module message. More...
 
struct  ketCube_cfg_ModuleCfgByte_t
 KETCube module configuration byte. More...
 
struct  ketCube_cfg_varDescr_t
 KETCube configuration variable descriptor. More...
 
struct  ketCube_cfg_Module_t
 KETCube module definition. More...
 

Typedefs

typedef struct ketCube_InterModMsg_t ketCube_InterModMsg_t
 KETCube inter-module message. More...
 
typedef enum ketCube_severity_t ketCube_severity_t
 KETCube debug severity definition. More...
 
typedef ketCube_cfg_ModError_t(* ketCube_cfg_ModVoidFn_t) (void)
 Pointer to function returning ketCube_cfg_ModError_t. More...
 
typedef ketCube_cfg_ModError_t(* ketCube_cfg_ModInitFn_t) (ketCube_InterModMsg_t ***msg)
 
typedef ketCube_cfg_ModError_t(* ketCube_cfg_ModDataFn_t) (uint8_t *buffer, uint8_t *len)
 
typedef ketCube_cfg_ModError_t(* ketCube_cfg_ModDataPtrFn_t) (ketCube_InterModMsg_t *msg)
 
typedef struct ketCube_cfg_ModuleCfgByte_t ketCube_cfg_ModuleCfgByte_t
 KETCube module configuration byte. More...
 
typedef struct ketCube_cfg_varDescr_t ketCube_cfg_varDescr_t
 KETCube configuration variable descriptor. More...
 
typedef struct ketCube_cfg_Module_t ketCube_cfg_Module_t
 KETCube module definition. More...
 

Enumerations

enum  ketCube_cfg_AllocEEPROM_t { KETCUBE_EEPROM_ALLOC_CORE = 0, KETCUBE_EEPROM_ALLOC_MODULES = 0, KETCUBE_EEPROM_ALLOC_LAST = 2048 }
 Allocated CFG EEPROM addreses. More...
 
enum  ketCube_cfg_LenEEPROM_t { KETCUBE_EEPROM_LEN_CORE = 64, KETCUBE_EEPROM_LEN_MODULES = 1024 }
 Length of CFG EEPROM data. More...
 
enum  ketCube_cfg_Error_t {
  KETCUBE_CFG_OK = 0, KETCUBE_CFG_ERROR = 1, ketCube_cfg_Load_ERROR = 2, ketCube_cfg_Save_ERROR = 3,
  KETCUBE_CFG_BUFF_SMALL = 4, KETCUBE_CFG_INV_HEX = 5
}
 Error code type. More...
 
enum  ketCube_cfg_ModError_t { KETCUBE_CFG_MODULE_OK = (uint8_t) 0, KETCUBE_CFG_MODULE_ERROR = !(KETCUBE_CFG_MODULE_OK) }
 Error code type. More...
 
enum  ketCube_cfg_DrvError_t { KETCUBE_CFG_DRV_OK = (uint8_t) 0, KETCUBE_CFG_DRV_ERROR = !(KETCUBE_CFG_MODULE_OK) }
 Error code type. More...
 
enum  ketCube_severity_t { KETCUBE_CFG_SEVERITY_NONE = 0x0, KETCUBE_CFG_SEVERITY_ERROR = 0x1, KETCUBE_CFG_SEVERITY_INFO = 0x2, KETCUBE_CFG_SEVERITY_DEBUG = 0x3 }
 KETCube debug severity definition. More...
 

Functions

ketCube_cfg_Error_t ketCube_cfg_Load (uint8_t *data, ketCube_cfg_moduleIDs_t id, ketCube_cfg_AllocEEPROM_t addr, ketCube_cfg_LenEEPROM_t len)
 Load configuration data from EEPROM. More...
 
ketCube_cfg_Error_t ketCube_cfg_LoadStr (char *data, uint8_t buffLen, ketCube_cfg_moduleIDs_t id, ketCube_cfg_AllocEEPROM_t addr, ketCube_cfg_LenEEPROM_t len)
 Load configuration data from EEPROM to string. More...
 
ketCube_cfg_Error_t ketCube_cfg_Save (uint8_t *data, ketCube_cfg_moduleIDs_t id, ketCube_cfg_AllocEEPROM_t addr, ketCube_cfg_LenEEPROM_t len)
 Save configuration data to EEPROM. More...
 
ketCube_cfg_Error_t ketCube_cfg_SaveStr (char *data, ketCube_cfg_moduleIDs_t id, ketCube_cfg_AllocEEPROM_t addr, ketCube_cfg_LenEEPROM_t len)
 Save configuration data to EEPROM from string. More...
 
ketCube_cfg_Error_t ketCube_cfg_SetDefaults (ketCube_cfg_moduleIDs_t id, ketCube_cfg_AllocEEPROM_t addr, ketCube_cfg_LenEEPROM_t len)
 Erase configuration from EEPROM. More...
 

Variables

const char * ketCube_severity_strAlias [4]
 String representatzion of KETCube severity levels. More...
 
volatile bool KETCube_eventsProcessed
 

Detailed Description

This file contains definitions for the KETCube configuration.

Author
Jan Belohoubek
Version
0.1
Date
2018-01-05
Attention

© Copyright (c) 2018 University of West Bohemia in Pilsen All rights reserved.

Developed by: The SmartCampus Team Department of Technologies and Measurement www.smartcampus.cz | www.zcu.cz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.