nochanges

Dependents:   BLE_Acceleration_Statejudging

Fork of nRF51822 by Nordic Semiconductor

Committer:
Rohit Grover
Date:
Mon Jul 07 13:43:31 2014 +0100
Revision:
37:c29c330d942c
changes required to upgrade to V7 of the soft-device

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rohit Grover 37:c29c330d942c 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
Rohit Grover 37:c29c330d942c 2 *
Rohit Grover 37:c29c330d942c 3 * The information contained herein is property of Nordic Semiconductor ASA.
Rohit Grover 37:c29c330d942c 4 * Terms and conditions of usage are described in detail in NORDIC
Rohit Grover 37:c29c330d942c 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
Rohit Grover 37:c29c330d942c 6 *
Rohit Grover 37:c29c330d942c 7 * Licensees are granted free, non-transferable use of the information. NO
Rohit Grover 37:c29c330d942c 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
Rohit Grover 37:c29c330d942c 9 * the file.
Rohit Grover 37:c29c330d942c 10 */
Rohit Grover 37:c29c330d942c 11
Rohit Grover 37:c29c330d942c 12 /** @file
Rohit Grover 37:c29c330d942c 13 *
Rohit Grover 37:c29c330d942c 14 * @defgroup ble_sdk_srv_gls_db Glucose Database Service
Rohit Grover 37:c29c330d942c 15 * @{
Rohit Grover 37:c29c330d942c 16 * @ingroup ble_sdk_srv
Rohit Grover 37:c29c330d942c 17 * @brief Glucose Service module.
Rohit Grover 37:c29c330d942c 18 *
Rohit Grover 37:c29c330d942c 19 * @details This module implements at database of stored glucose measurement values.
Rohit Grover 37:c29c330d942c 20 *
Rohit Grover 37:c29c330d942c 21 * @note Attention!
Rohit Grover 37:c29c330d942c 22 * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile
Rohit Grover 37:c29c330d942c 23 * qualification listings, These APIs must not be modified. However, the corresponding
Rohit Grover 37:c29c330d942c 24 * functions' implementations can be modified.
Rohit Grover 37:c29c330d942c 25 */
Rohit Grover 37:c29c330d942c 26
Rohit Grover 37:c29c330d942c 27 #ifndef BLE_GLS_DB_H__
Rohit Grover 37:c29c330d942c 28 #define BLE_GLS_DB_H__
Rohit Grover 37:c29c330d942c 29
Rohit Grover 37:c29c330d942c 30 #include <stdint.h>
Rohit Grover 37:c29c330d942c 31 #include "ble_gls.h"
Rohit Grover 37:c29c330d942c 32
Rohit Grover 37:c29c330d942c 33 #define BLE_GLS_DB_MAX_RECORDS 20
Rohit Grover 37:c29c330d942c 34
Rohit Grover 37:c29c330d942c 35 /**@brief Function for initializing the glucose record database.
Rohit Grover 37:c29c330d942c 36 *
Rohit Grover 37:c29c330d942c 37 * @details This call initializes the database holding glucose records.
Rohit Grover 37:c29c330d942c 38 *
Rohit Grover 37:c29c330d942c 39 * @return NRF_SUCCESS on success.
Rohit Grover 37:c29c330d942c 40 */
Rohit Grover 37:c29c330d942c 41 uint32_t ble_gls_db_init(void);
Rohit Grover 37:c29c330d942c 42
Rohit Grover 37:c29c330d942c 43 /**@brief Function for getting the number of records in the database.
Rohit Grover 37:c29c330d942c 44 *
Rohit Grover 37:c29c330d942c 45 * @details This call returns the number of records in the database.
Rohit Grover 37:c29c330d942c 46 *
Rohit Grover 37:c29c330d942c 47 * @return Number of records in the database.
Rohit Grover 37:c29c330d942c 48 */
Rohit Grover 37:c29c330d942c 49 uint16_t ble_gls_db_num_records_get(void);
Rohit Grover 37:c29c330d942c 50
Rohit Grover 37:c29c330d942c 51 /**@brief Function for getting a record from the database.
Rohit Grover 37:c29c330d942c 52 *
Rohit Grover 37:c29c330d942c 53 * @details This call returns a specified record from the database.
Rohit Grover 37:c29c330d942c 54 *
Rohit Grover 37:c29c330d942c 55 * @param[in] record_num Index of the record to retrieve.
Rohit Grover 37:c29c330d942c 56 * @param[out] p_rec Pointer to record structure where retrieved record is copied to.
Rohit Grover 37:c29c330d942c 57 *
Rohit Grover 37:c29c330d942c 58 * @return NRF_SUCCESS on success.
Rohit Grover 37:c29c330d942c 59 */
Rohit Grover 37:c29c330d942c 60 uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec);
Rohit Grover 37:c29c330d942c 61
Rohit Grover 37:c29c330d942c 62 /**@brief Function for adding a record at the end of the database.
Rohit Grover 37:c29c330d942c 63 *
Rohit Grover 37:c29c330d942c 64 * @details This call adds a record as the last record in the database.
Rohit Grover 37:c29c330d942c 65 *
Rohit Grover 37:c29c330d942c 66 * @param[in] p_rec Pointer to record to add to database.
Rohit Grover 37:c29c330d942c 67 *
Rohit Grover 37:c29c330d942c 68 * @return NRF_SUCCESS on success.
Rohit Grover 37:c29c330d942c 69 */
Rohit Grover 37:c29c330d942c 70 uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec);
Rohit Grover 37:c29c330d942c 71
Rohit Grover 37:c29c330d942c 72 /**@brief Function for deleting a database entry.
Rohit Grover 37:c29c330d942c 73 *
Rohit Grover 37:c29c330d942c 74 * @details This call deletes an record from the database.
Rohit Grover 37:c29c330d942c 75 *
Rohit Grover 37:c29c330d942c 76 * @param[in] record_num Index of record to delete.
Rohit Grover 37:c29c330d942c 77 *
Rohit Grover 37:c29c330d942c 78 * @return NRF_SUCCESS on success.
Rohit Grover 37:c29c330d942c 79 */
Rohit Grover 37:c29c330d942c 80 uint32_t ble_gls_db_record_delete(uint8_t record_num);
Rohit Grover 37:c29c330d942c 81
Rohit Grover 37:c29c330d942c 82 #endif // BLE_GLS_DB_H__
Rohit Grover 37:c29c330d942c 83
Rohit Grover 37:c29c330d942c 84 /** @} */
Rohit Grover 37:c29c330d942c 85
Rohit Grover 37:c29c330d942c 86 /** @endcond */