This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Glucose database FDS

Hi!

Would it be possible to modify the glucose example to save the database records to flash using FDS?

Keeping the overall structure of reading and writing, just changing e.g. the uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec)and uint32_t ble_gls_db_record_get(uint8_t rec_ndx, ble_gls_rec_t * p_rec)functions to FDS write and read calls.

You could use meas.sequence_numberas FDS key. E.g. in record_add function:

uint16_t	file_ID = glucose_file_ID;		//Files are groups of records
uint16_t	key	= p_rec->meas.sequence_number;	//identification within file group

and in record_get function use the sequence number/key to find the records requested through the RACP.

Am I missing something crucial that would totally prevent implementing what I am thinking? Is it possible to use the FDS read while being in BLE connection and performing RACP requests? Considering interrupt priority?

Related