|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
#include "user_config.h"#include <stdio.h>#include "./proto/transcoder.h"#include "./storage/fram.h"Go to the source code of this file.
Functions | |
| UserConfigStatus | UserConfig_WriteToFRAM (uint16_t addr, uint8_t *data, uint16_t length) |
| Writes user configuration data to FRAM. | |
| UserConfigStatus | UserConfig_ReadFromFRAM (uint16_t addr, uint16_t length, uint8_t *data) |
| Reads user configuration data from 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. | |
| UserConfigStatus | UserConfigLoad (void) |
| Loads user configuration data from FRAM to RAM. | |
| const UserConfiguration * | UserConfigGet (void) |
| Gets a reference to the loaded user configuration data in RAM. | |
| UserConfigStatus | UserConfigSave (const UserConfiguration *config) |
| Saves the configuration to FRAM. | |
| 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 UserConfig_ReadFromFRAM | ( | uint16_t | addr, |
| uint16_t | length, | ||
| uint8_t * | data | ||
| ) |
Reads user configuration data from FRAM.
This function reads a specified amount of user configuration data from the FRAM memory starting at a specified address.
| addr | Starting address in FRAM to read data from. |
| length | Length of the data to be read. |
| data | Pointer to the buffer to store the read data. |
Definition at line 69 of file user_config.c.
References data, FRAM_OK, fram_read(), USERCONFIG_FRAM_ERROR, and USERCONFIG_OK.
Referenced by UserConfigBytes().
| UserConfigStatus UserConfig_WriteToFRAM | ( | uint16_t | addr, |
| uint8_t * | data, | ||
| uint16_t | length | ||
| ) |
Writes user configuration data to FRAM.
This function writes a specified amount of user configuration data to the FRAM memory starting at a specified address.
| addr | Starting address in FRAM to write data. |
| data | Pointer to the data to be written. |
| length | Length of the data to be written. |
Definition at line 59 of file user_config.c.
References data, FRAM_OK, fram_write(), USERCONFIG_FRAM_ERROR, and USERCONFIG_OK.
Referenced by UserConfigSave().