Ares-LoRa settings manager.
More...
#include <zephyr/kernel.h>
Go to the source code of this file.
Ares-LoRa settings manager.
- Date
- 3/27/26
- Author
- Tom Schmitz <tschm.nosp@m.itz@.nosp@m.andre.nosp@m.w.cm.nosp@m.u.edu>
◆ FOREACH_ARES_SETTING
| #define FOREACH_ARES_SETTING |
( |
| FUNC | ) |
|
Value: FUNC(ID, 0, 1, 0xFFFF) \
FUNC(WAIT_USB_HOST, 0, 0, 1) \
FUNC(PANID, 0, 0, 0xFFFF) \
FUNC(REPCNT, 10, 1, 0xFFFFFFFF)
The settings for Ares-LoRa, their defaults, and bounds.
- Node ID
- Wait for USB
- Personal Area Network ID
- Repetition count
Format: setting name, default value, minimum value, maximum value.
- Parameters
-
| FUNC | The generator macro function. |
◆ GENERATE_ENUM
| #define GENERATE_ENUM |
( |
| setting_, |
|
|
| ... ) |
Value:UTIL_CAT(ARES_SETTING_, setting_),
Helper for generating the enumerations for Ares-LoRa settings.
- Parameters
-
| setting_ | The setting name. |
◆ ares_setting
Represents various settings for Ares-LoRa.
- Note
- This enumeration is automatically with FOREACH_ARES_SETTING and GENERATE_ENUM. Please refer to FOREACH_ARES_SETTING to get a complete list of settings generated.
| Enumerator |
|---|
| ARES_SETTING_RESERVED | Reserved settings enumerator indicating the last setting.
|
◆ reset_settings()
| void reset_settings |
( |
void | | ) |
|
Resets all the settings to their default values.
◆ retrieve_setting()
| int retrieve_setting |
( |
enum ares_setting | setting, |
|
|
uint32_t * | value ) |
Read the given setting value.
- Parameters
-
| [in] | setting | The setting to read. |
| [out] | value | A pointer to the container for the setting. |
- Returns
- 0 on success.
-
-EINVAL if setting is invalid or value is NULL.
◆ update_setting()
| int update_setting |
( |
enum ares_setting | setting, |
|
|
uint32_t | value ) |
Write a new value for a setting.
- Parameters
-
| [in] | setting | The setting to update. |
| [in] | value | The new value of the setting. |
- Returns
- 0 on success.
-
-EINVAL if setting is invalid.
-
-ERANGE if the setting is out of range.
-
negative error code otherwise.