Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_wp.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief WP service implementation. Arm Ltd. proprietary servicde.
6  *
7  * Copyright (c) 2011-2018 Arm Ltd. All Rights Reserved.
8  * Arm Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact Arm Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 
20 #ifndef SVC_WP_H
21 #define SVC_WP_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup WP_SERVICE
28  * \{ */
29 
30 /**************************************************************************************************
31  Macros
32 **************************************************************************************************/
33 
34 /**************************************************************************************************
35  Handle Ranges
36 **************************************************************************************************/
37 
38 /** \name Arm Ltd. Proprietary Service Handles
39  *
40  */
41 /**@{*/
42 /*! \brief Proprietary Service */
43 #define WP_START_HDL 0x200 /*!< \brief Start handle. */
44 #define WP_END_HDL (WP_MAX_HDL - 1) /*!< \brief End handle. */
45 
46 /**************************************************************************************************
47  Handles
48 **************************************************************************************************/
49 
50 /*! \brief Proprietary Service Handles */
51 enum
52 {
53  WP_SVC_HDL = WP_START_HDL, /*!< \brief Proprietary service declaration */
54  WP_DAT_CH_HDL, /*!< \brief Proprietary data characteristic */
55  WP_DAT_HDL, /*!< \brief Proprietary data */
56  WP_DAT_CH_CCC_HDL, /*!< \brief Proprietary data client characteristic configuration */
57  WP_MAX_HDL /*!< \brief Maximum handle. */
58 };
59 /**@}*/
60 
61 /**************************************************************************************************
62  Function Declarations
63 **************************************************************************************************/
64 
65 /*************************************************************************************************/
66 /*!
67  * \brief Add the services to the attribute server.
68  *
69  * \return None.
70  */
71 /*************************************************************************************************/
72 void SvcWpAddGroup(void);
73 
74 /*************************************************************************************************/
75 /*!
76  * \brief Remove the services from the attribute server.
77  *
78  * \return None.
79  */
80 /*************************************************************************************************/
81 void SvcWpRemoveGroup(void);
82 
83 /*************************************************************************************************/
84 /*!
85  * \brief Register callbacks for the service.
86  *
87  * \param readCback Read callback function.
88  * \param writeCback Write callback function.
89  *
90  * \return None.
91  */
92 /*************************************************************************************************/
93 void SvcWpCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback);
94 
95 /*! \} */ /* WP_SERVICE */
96 
97 #ifdef __cplusplus
98 };
99 #endif
100 
101 #endif /* SVC_WP_H */
void SvcWpAddGroup(void)
Add the services to the attribute server.
uint8_t(* attsWriteCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr)
Attribute group write callback.
Definition: att_api.h:237
Proprietary data client characteristic configuration.
Definition: svc_wp.h:56
Proprietary service declaration.
Definition: svc_wp.h:53
#define WP_START_HDL
Proprietary Service.
Definition: svc_wp.h:43
Maximum handle.
Definition: svc_wp.h:57
void SvcWpCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback)
Register callbacks for the service.
void SvcWpRemoveGroup(void)
Remove the services from the attribute server.
Proprietary data characteristic.
Definition: svc_wp.h:54
Proprietary data.
Definition: svc_wp.h:55
uint8_t(* attsReadCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr)
Attribute group read callback.
Definition: att_api.h:218