mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 14:30:25 +00:00
8ec1c74baf
* SavedStruct: Replace saved_struct_get_payload_size with saved_struct_get_metadata This new function can obtain the magic value, version and payload size all at once. This makes the function useful e.g. for backwards compatibility. * SavedStruct: const-qualify saved_struct_save * Toolbox: add saved struct documentation Co-authored-by: あく <alleteam@gmail.com>
43 lines
1 KiB
C
43 lines
1 KiB
C
/**
|
|
* @file expansion_settings.h
|
|
* @brief Expansion module support settings.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Expansion module support settings storage type.
|
|
*/
|
|
typedef struct {
|
|
/**
|
|
* Numerical index of serial port used to communicate
|
|
* with expansion modules.
|
|
*/
|
|
uint8_t uart_index;
|
|
} ExpansionSettings;
|
|
|
|
/**
|
|
* @brief Load expansion module support settings from file.
|
|
*
|
|
* @param[out] settings pointer to an ExpansionSettings instance to load settings into.
|
|
* @returns true if the settings were successfully loaded, false otherwise.
|
|
*/
|
|
bool expansion_settings_load(ExpansionSettings* settings);
|
|
|
|
/**
|
|
* @brief Save expansion module support settings to file.
|
|
*
|
|
* @param[in] settings pointer to an ExpansionSettings instance to save settings from.
|
|
* @returns true if the settings were successfully saved, false otherwise.
|
|
*/
|
|
bool expansion_settings_save(const ExpansionSettings* settings);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|