Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-os_TYBLE16 BME280_SPI RX8025NB nRF51_Vdd MB85RSxx_SPI
dt_logger.h
00001 /* 00002 * Mbed Application program / TYBLE-16 Data logger 00003 * 00004 * Copyright (c) 2019 Kenji Arai / JH1PJL 00005 * http://www.page.sannet.ne.jp/kenjia/index.html 00006 * https://os.mbed.com/users/kenjiArai/ 00007 * Created: December 14th, 2019 00008 * Revised: December 19th, 2019 00009 */ 00010 00011 #ifndef DATA_LOGGER_H 00012 #define DATA_LOGGER_H 00013 00014 // Include -------------------------------------------------------------------- 00015 #include "RX8025NB.h" 00016 #include "MB85RSxx_SPI.h" 00017 00018 // Definition ---------------------------------------------------------------- 00019 #define DATE_COUNT_START (1575158400) // 2019/12/1 0:0:0 00020 // Buffer size 00021 #define FRAM_SIZE 256 * 2048 // 2Mbits = 256 KBytes 00022 #define PKT_SIZE 16 // Packet size 00023 #define BLK_NO 16384 // 256KB/16 = 16384 00024 #define ALL_SIZE (PKT_SIZE) * (BLK_NO) 00025 #if ALL_SIZ > FRAM_SIZE 00026 #error "Data size in FRAM is too big!" 00027 #endif 00028 #define PTR_SIZE 16 00029 00030 // Buffer control 00031 #define RING_TOP 1 00032 #define RING_TAIL (BLK_NO - RING_TOP -1) 00033 #define BLK_SIZE 16 00034 00035 // Function prototypes -------------------------------------------------------- 00036 void mon(RX8025 &ex_rtc, MB85RSxx_SPI &fram); 00037 void dtlog_data_pack(void); 00038 void dtlog_one_write(MB85RSxx_SPI &fram); 00039 00040 #endif // DATA_LOGGER_H
Generated on Mon Jul 18 2022 00:15:15 by
1.7.2