Select Git revision
Forked from
card10 / firmware
Source project has a limited visibility.
svc_dis.c 9.72 KiB
/*************************************************************************************************/
/*!
* \file
*
* \brief Example Device Information Service implementation.
*
* 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.
*/
/*************************************************************************************************/
/* card10:
* Copied from lib/sdk/Libraries/BTLE/stack/ble-profiles/sources/services/svc_dis.c
*
* Contains adaptions for the card10 (e.g. manufacturer name)
*/
#include "wsf_types.h"
#include "att_api.h"
#include "wsf_trace.h"
#include "util/bstream.h"
#include "svc_dis.h"
#include "svc_cfg.h"
/**************************************************************************************************
Macros
**************************************************************************************************/
/*! Characteristic read permissions */
#ifndef DIS_SEC_PERMIT_READ
#define DIS_SEC_PERMIT_READ SVC_SEC_PERMIT_READ
#endif
/*! Default manufacturer name */
#define DIS_DEFAULT_MFR_NAME "CCC"
/*! Length of default manufacturer name */
#define DIS_DEFAULT_MFR_NAME_LEN 3
/*! Default model number */
#define DIS_DEFAULT_MODEL_NUM "1"
/*! Length of default model number */
#define DIS_DEFAULT_MODEL_NUM_LEN 1
/*! Default serial number */
#define DIS_DEFAULT_SERIAL_NUM "1"
/*! Length of default serial number */
#define DIS_DEFAULT_SERIAL_NUM_LEN 1
/*! Default firmware revision */
#define DIS_DEFAULT_FW_REV "<git hash>"
/*! Length of default firmware revision */
#define DIS_DEFAULT_FW_REV_LEN 10
/*! Default hardware revision */
#define DIS_DEFAULT_HW_REV "1"
/*! Length of default hardware revision */
#define DIS_DEFAULT_HW_REV_LEN 1