Restructure config module for easier addition of items
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define MAX_HOSTNAME_SIZE 32
|
||||
#define CONFIG_MAX_VALUE_SIZE 32U
|
||||
|
||||
/**
|
||||
* Callback type for consumers of string settings.
|
||||
* Callback type for config updates
|
||||
*/
|
||||
typedef void (*ConfigStringCallback)(const char *value);
|
||||
typedef void (*ConfigCallback)(const char *value);
|
||||
|
||||
/**
|
||||
* Initialize the configuration module.
|
||||
@@ -21,7 +21,7 @@ typedef void (*ConfigStringCallback)(const char *value);
|
||||
* If there is a saved configuration, it will be loaded. Otherwise,
|
||||
* the default configuration will be loaded and saved.
|
||||
*/
|
||||
void config_init();
|
||||
void config_init(void);
|
||||
|
||||
/**
|
||||
* Set the device's hostname.
|
||||
@@ -49,6 +49,6 @@ size_t config_get_hostname(char *buffer, size_t buffer_size);
|
||||
* lifetime of the passed argument will be static, but the value may
|
||||
* be modified once the callback returns.
|
||||
*/
|
||||
void config_add_hostname_callback(ConfigStringCallback callback);
|
||||
void config_add_hostname_callback(ConfigCallback callback);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user