|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include "./proto/user_config.pb.h"Go to the source code of this file.
Macros | |
| #define | RX_BUFFER_SIZE UserConfiguration_size |
| #define | USER_CONFIG_START_ADDRESS 1794 |
| #define | USER_CONFIG_LEN_ADDR 1792 |
Enumerations | |
| enum | UserConfigStatus { USERCONFIG_OK = 0 , USERCONFIG_FRAM_ERROR = -1 , USERCONFIG_DECODE_ERROR = -2 , USERCONFIG_NO_RESPONSE = -3 , USERCONFIG_COMM_ERROR = -4 , USERCONFIG_INVALID_RESPONSE = -5 , USERCONFIG_NOT_LOADED = -6 , USERCONFIG_EMPTY_CONFIG = -7 , USERCONFIG_ENCODE_ERROR = -8 , USERCONFIG_NULL_CONFIG = -9 } |
Functions | |
| UserConfigStatus | UserConfigLoad (void) |
| Loads user configuration data from FRAM to RAM. | |
| UserConfigStatus | UserConfigSave (const UserConfiguration *config) |
| Saves the configuration to FRAM. | |
| const UserConfiguration * | UserConfigGet (void) |
| Gets a reference to the loaded user configuration data in RAM. | |
| void | UserConfigPrintAny (const UserConfiguration *config) |
| Prints arbitrary user config over serial. | |
| void | UserConfigPrint (void) |
| Prints the current user configuration over serial. | |
| UserConfigStatus | UserConfigClear (void) |
| Clears the user configuration stored in FRAM. | |
| UserConfigStatus | UserConfigBytes (uint8_t *buffer, uint16_t *length) |
| Gets encoded bytes from userconfig. | |
| UserConfigStatus | UserConfigLoadBytes (uint8_t *buffer, uint16_t length) |
| Load user config from bytes. | |