SmartSnippets DA1459x SDK
Data Structures | Enumerations | Functions

Weight Scale Service sample implementation API. More...

#include <stdint.h>
#include "ble_service.h"
#include "svc_types.h"

Go to the source code of this file.

Data Structures

struct  wss_callbacks_t
 WSS application callbacks. More...
 
struct  wss_weight_measurement_t
 WSS weight measurement data. More...
 

Enumerations

enum  wss_unit_t { WSS_UNIT_SI, WSS_UNIT_IMPERIAL }
 WSS unit types. More...
 
enum  wss_feature_t {
  WSS_FEAT_TIME_STAMP_SUPPORTED = 0x0001, WSS_FEAT_MULTI_USER_SUPPORTED = 0x0002, WSS_FEAT_BMI_SUPPORTED = 0x0004, WSS_FEAT_WT_DISPLAY_500G_ACC = 0x0008,
  WSS_FEAT_WT_DISPLAY_200G_ACC = 0x0010, WSS_FEAT_WT_DISPLAY_100G_ACC = 0x0018, WSS_FEAT_WT_DISPLAY_50G_ACC = 0x0020, WSS_FEAT_WT_DISPLAY_20G_ACC = 0x0028,
  WSS_FEAT_WT_DISPLAY_10G_ACC = 0x0030, WSS_FEAT_WT_DISPLAY_5G_ACC = 0x0038, WSS_FEAT_HT_DISPLAY_10MM_ACC = 0x0080, WSS_FEAT_HT_DISPLAY_5MM_ACC = 0x0100,
  WSS_FEAT_HT_DISPLAY_1MM_ACC = 0x0180
}
 Weight Feature characteristic bit values. More...
 

Functions

ble_service_twss_init (const ble_service_config_t *config, wss_feature_t features, const wss_callbacks_t *cb)
 Register Weight Scale Service instance. More...
 
ble_error_t wss_indicate_weight (ble_service_t *svc, uint16_t conn_idx, const wss_weight_measurement_t *measurement)
 Send weight indication to client. More...
 
void wss_indicate_weight_all (ble_service_t *svc, const wss_weight_measurement_t *measurement)
 Send weight indication to all interested clients. More...
 
bool wss_is_indication_enabled (ble_service_t *svc, uint16_t conn_idx)
 Check if indication is enabled. More...
 

Detailed Description

Weight Scale Service sample implementation API.

Copyright (C) 2015-2018 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.