Files
TencentOS-tiny/examples/LoRaWAN/lora_demo.h
Winfred LIN 47d6313ba1 added reading flash functions for stm32l0xx series
1. implemented HAL_StatusTypeDef HAL_FLASH_ReadWord(uint32_t Address, uint32_t* Data); and HAL_StatusTypeDef HAL_FLASH_ReadHalfWord(uint32_t Address, uint16_t* Data); which allows user to read the internal FLASH (with out read protection)

2. implemeted device_config struct to store device configurations, e.g. magnetometer fullscale, report period, etc.

3. added demonstration code of using flash reading apis in lora_demo.c, in which the configuration sent from the cloud is stored into the internal Data EEPROM bank1, and each time when the device is booted, the configurations would be loaded from the Data EEPROM and used to initialize the application.
2020-04-03 18:21:16 +11:00

22 lines
320 B
C

#ifndef __APP_DEMO_H__
#define __APP_DEMO_H__
#include <stdbool.h>
#include "mcu_init.h"
#include "tos_at.h"
#include "string.h"
#include "cmsis_os.h"
#include "lora_module_wrapper.h"
#ifdef __cplusplus
extern "C" {
#endif
void application_entry(void *arg);
#ifdef __cplusplus
}
#endif
#endif /* __APP_DEMO_H__ */