Cordio Stack and Cordio Profiles  r2p3-02rel0
wdxs_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Wireless Data Exchange profile application interface.
6  *
7  * Copyright (c) 2013-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 WDXS_API_H
21 #define WDXS_API_H
22 
23 #include "att_api.h"
24 #include "wdx_defs.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /*! \addtogroup WIRELESS_DATA_EXCHANGE_PROFILE
31  * \{ */
32 
33 /**************************************************************************************************
34  Macros
35 **************************************************************************************************/
36 
37 /*! \brief Size of RAM Media used by the application */
38 #define WDXS_APP_RAM_MEDIA_SIZE 256
39 
40 /*! \brief Device Model Name */
41 #ifndef WDXS_DEVICE_MODEL
42 #define WDXS_DEVICE_MODEL "WDXS App"
43 #endif
44 
45 /*************************************************************************************************/
46 /*!
47  * \brief Called at startup to configure WDXS authentication.
48  *
49  * \param reqLevel Level of authentication that is required for a client to use WDXS
50  * \param pKey Authentication key (set to NULL if no authentication is required)
51  *
52  * \return None.
53  */
54 /*************************************************************************************************/
55 void WdxsAuthenticationCfg(bool_t reqLevel, uint8_t *pKey);
56 
57 /*************************************************************************************************/
58 /*!
59  * \brief Handle WSF events for WDXS.
60  *
61  * \param event event
62  * \param pMsg message assiciated with event
63  *
64  * \return None.
65  */
66 /*************************************************************************************************/
67 void WdxsHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
68 
69 /*************************************************************************************************/
70 /*!
71  * \brief WSF Task Initialization for WDXS task.
72  *
73  * \param handlerId ID of the WDXS task
74  *
75  * \return None.
76  */
77 /*************************************************************************************************/
78 void WdxsHandlerInit(wsfHandlerId_t handlerId);
79 
80 /*************************************************************************************************/
81 /*!
82  * \brief Called by application to notify the WDXS of ATT Events.
83  *
84  * \param pEvt Pointer to the ATT Event
85  *
86  * \return TRUE if the application should ignore the event, else FALSE.
87  */
88 /*************************************************************************************************/
90 
91 /*************************************************************************************************/
92 /*!
93  * \brief Called by application to notify the WDXS of DM Events.
94  *
95  * \param pEvt Pointer to the DM Event
96  *
97  * \return None.
98  */
99 /*************************************************************************************************/
100 void WdxsProcDmMsg(dmEvt_t *pEvt);
101 
102 /*************************************************************************************************/
103 /*!
104  * \brief Set the CCCD index used by the application for WDXS service characteristics.
105  *
106  * \param dcCccIdx Device Control CCCD index.
107  * \param auCccIdx Authentication CCCD index.
108  * \param ftcCccIdx File Transfer Control CCCD index.
109  * \param ftdCccIdx File Transfer Data CCCD index.
110  *
111  * \return None.
112  */
113 /*************************************************************************************************/
114 void WdxsSetCccIdx(uint8_t dcCccIdx, uint8_t auCccIdx, uint8_t ftcCccIdx, uint8_t ftdCccIdx);
115 
116 /*************************************************************************************************/
117 /*!
118  * \brief Registers the platform dependent Flash Media with the Embedded File System (EFS)
119  *
120  * \return None.
121  */
122 /*************************************************************************************************/
123 void WdxsFlashMediaInit(void);
124 
125 /*************************************************************************************************/
126 /*!
127  * \brief Registers the platform dependent OTA Media with the Embedded File System (EFS)
128  *
129  * \return None.
130  */
131 /*************************************************************************************************/
132 void WdxsOtaMediaInit(void);
133 
134 /*************************************************************************************************/
135 /*!
136  * \brief Resets the system.
137  *
138  * \return None.
139  */
140 /*************************************************************************************************/
141 void WdxsResetSystem(void);
142 
143 /*************************************************************************************************/
144 /*!
145  * \brief Initialize WDXS Device Configuration PHY.
146  *
147  * \return None.
148  */
149 /*************************************************************************************************/
150 void WdxsPhyInit(void);
151 
152 /*! \} */ /* WIRELESS_DATA_EXCHANGE_PROFILE */
153 
154 #ifdef __cplusplus
155 }
156 #endif
157 
158 #endif /* WDXS_API_H */
void WdxsFlashMediaInit(void)
Registers the platform dependent Flash Media with the Embedded File System (EFS)
void WdxsPhyInit(void)
Initialize WDXS Device Configuration PHY.
uint8_t wsfEventMask_t
Event handler event mask data type.
Definition: wsf_os.h:77
void WdxsAuthenticationCfg(bool_t reqLevel, uint8_t *pKey)
Called at startup to configure WDXS authentication.
ATT callback event.
Definition: att_api.h:154
uint8_t bool_t
Boolean data type.
Definition: wsf_types.h:78
void WdxsSetCccIdx(uint8_t dcCccIdx, uint8_t auCccIdx, uint8_t ftcCccIdx, uint8_t ftdCccIdx)
Set the CCCD index used by the application for WDXS service characteristics.
void WdxsProcDmMsg(dmEvt_t *pEvt)
Called by application to notify the WDXS of DM Events.
void WdxsHandlerInit(wsfHandlerId_t handlerId)
WSF Task Initialization for WDXS task.
void WdxsHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
Handle WSF events for WDXS.
Union of DM callback event data types.
Definition: dm_api.h:658
Wireless Data Exchange Protocol Definitions.
uint8_t wsfHandlerId_t
Event handler ID data type.
Definition: wsf_os.h:74
uint8_t WdxsAttCback(attEvt_t *pEvt)
Called by application to notify the WDXS of ATT Events.
void WdxsResetSystem(void)
Resets the system.
Attribute protocol client and server API.
Common message structure passed to event handler.
Definition: wsf_os.h:97
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
void WdxsOtaMediaInit(void)
Registers the platform dependent OTA Media with the Embedded File System (EFS)