Skip to content
Snippets Groups Projects
Select Git revision
  • cecaa6eacdd6a549e41e0dfd4b50d8a4487b98c1
  • master default protected
  • esp32-nimble-wiki
  • rahix/hw-lock-new-mutex
  • dx/somewhat-more-dynamic-config
  • schneider/sdk-0.2.1-7
  • schneider/bsec
  • dx/meh-bdf-to-stm
  • dx/flatten-config-module
  • genofire/ble-follow-py
  • schneider/ble-stability
  • schneider/ble-stability-new-phy
  • add_menu_vibration
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • schneider/fundamental-test
  • schneider/ble-buffers
  • v1.12
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
37 results

dats_main.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    dats_main.c 24.47 KiB
    /*************************************************************************************************/
    /*!
     *  \file
     *
     *  \brief  Data transmitter sample application.
     *
     *  Copyright (c) 2012-2018 Arm Ltd. All Rights Reserved.
     *  ARM Ltd. confidential and proprietary.
     *
     *  IMPORTANT.  Your use of this file is governed by a Software License Agreement
     *  ("Agreement") that must be accepted in order to download or otherwise receive a
     *  copy of this file.  You may not use or copy this file for any purpose other than
     *  as described in the Agreement.  If you do not agree to all of the terms of the
     *  Agreement do not use this file and delete all copies in your possession or control;
     *  if you do not have a copy of the Agreement, you must contact ARM Ltd. prior
     *  to any use, copying or further distribution of this software.
     */
    /*************************************************************************************************/
    
    #include <stdio.h>
    #include <string.h>
    #include "mxc_device.h"
    #include "wsf_types.h"
    #include "util/bstream.h"
    #include "wsf_msg.h"
    #include "wsf_trace.h"
    #include "wsf_buf.h"
    #include "wsf_assert.h"
    #include "hci_api.h"
    #include "hci_vs.h"
    #include "sec_api.h"
    #include "dm_api.h"
    #include "smp_api.h"
    #include "att_api.h"
    #include "app_api.h"
    #include "app_main.h"
    #include "app_db.h"
    #include "app_ui.h"
    #include "svc_ch.h"
    #include "svc_core.h"
    #include "svc_wp.h"
    #include "util/calc128.h"
    #include "dats/dats_api.h"
    #include "gcr_regs.h"
    
    /**************************************************************************************************
      Macros
    **************************************************************************************************/
    
    /*! Enumeration of client characteristic configuration descriptors */
    enum
    {
      DATS_GATT_SC_CCC_IDX,           /*! GATT service, service changed characteristic */
      DATS_WP_DAT_CCC_IDX,            /*! ARM Ltd. proprietary service, data transfer characteristic */
      DATS_NUM_CCC_IDX
    };
    
    /**************************************************************************************************
      Configurable Parameters
    **************************************************************************************************/
    
    /*! configurable parameters for advertising */
    /* These intervals directly impact energy usage during the non-connected/advertising mode */
    #ifdef BTLE_APP_USE_LEGACY_API
    static const appAdvCfg_t datsAdvCfg =
    {
      { 1000,     0,     0},                  /*! Advertising durations in ms */
      {   96,   200,     0}                   /*! Advertising intervals in 0.625 ms units */
    };
    #else /* BTLE_APP_USE_LEGACY_API */