Skip to content
Snippets Groups Projects
Select Git revision
  • d21c7d7ea02b006ff5971f65449dec1ac700c732
  • master default protected
  • wdt-fix
  • appDb-store-timing
  • wdt
  • koalo/bhi160
  • genofire/ble-rewrite
  • rahix/simple_menu
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • ios-workarounds
  • koalo/wip/i2c-for-python
  • renze/safe_mode
  • renze/hatchery_apps
  • schneider/fundamental-test
  • koalo/factory-reset
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
28 results

fit_main.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    fit_main.c 22.59 KiB
    /*************************************************************************************************/
    /*!
     *  \file
     *
     *  \brief  Fitness sample application for the following profiles:
     *            Heart Rate profile
     *
     *  Copyright (c) 2011-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 <string.h>
    #include "wsf_types.h"
    #include "util/bstream.h"
    #include "wsf_msg.h"
    #include "wsf_trace.h"
    #include "hci_api.h"
    #include "dm_api.h"
    #include "att_api.h"
    #include "smp_api.h"
    #include "app_api.h"
    #include "app_db.h"
    #include "app_ui.h"
    #include "app_hw.h"
    #include "svc_ch.h"
    #include "svc_core.h"
    #include "svc_hrs.h"
    #include "svc_dis.h"
    #include "svc_batt.h"
    #include "svc_rscs.h"
    #include "bas/bas_api.h"
    #include "hrps/hrps_api.h"
    #include "rscp/rscp_api.h"
    #include "fit_api.h"
    
    /**************************************************************************************************
      Macros
    **************************************************************************************************/
    
    /*! WSF message event starting value */
    #define FIT_MSG_START               0xA0
    
    /* Default Running Speed and Cadence Measurement period (seconds) */
    #define FIT_DEFAULT_RSCM_PERIOD        1
    
    /*! WSF message event enumeration */
    enum
    {
      FIT_HR_TIMER_IND = FIT_MSG_START,       /*! Heart rate measurement timer expired */
      FIT_BATT_TIMER_IND,                     /*! Battery measurement timer expired */
      FIT_RUNNING_TIMER_IND                   /*! Running speed and cadence measurement timer expired */
    };
    
    /**************************************************************************************************
      Data Types
    **************************************************************************************************/
    
    /*! Application message type */
    typedef union
    {
      wsfMsgHdr_t     hdr;