TI-OpenThread  1.08.02.01
CC2652RB_LAUNCHXL/thread/shade/shade.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file shade.h
4 
5  @brief shade example application definitions.
6 
7  Group: CMCU, LPC
8  Target Device: cc13x2_26x2
9 
10  ******************************************************************************
11 
12  Copyright (c) 2017-2020, Texas Instruments Incorporated
13  All rights reserved.
14 
15  Redistribution and use in source and binary forms, with or without
16  modification, are permitted provided that the following conditions
17  are met:
18 
19  * Redistributions of source code must retain the above copyright
20  notice, this list of conditions and the following disclaimer.
21 
22  * Redistributions in binary form must reproduce the above copyright
23  notice, this list of conditions and the following disclaimer in the
24  documentation and/or other materials provided with the distribution.
25 
26  * Neither the name of Texas Instruments Incorporated nor the names of
27  its contributors may be used to endorse or promote products derived
28  from this software without specific prior written permission.
29 
30  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
32  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
37  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 
42  ******************************************************************************
43 
44 
45  *****************************************************************************/
46 
47 #ifndef _SHADE_H_
48 #define _SHADE_H_
49 
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif
54 
55 /******************************************************************************
56  Constants and definitions
57  *****************************************************************************/
59 #define SHADE_URI "blinds/"
60 
61 #define SHADE_STATE_URI "blinds/state"
62 
63 #define SHADE_STATE_OPEN "open"
64 
65 #define SHADE_STATE_CLOSED "closed"
66 
67 #define SHADE_STATE_DRAWN "drawn"
68 
69 
73 typedef enum
74 {
75  Shade_evtOpen, /* Shade openLock event */
76  Shade_evtClosed, /* Shade closed event */
77  Shade_evtDrawn, /* Shade drawn event */
78  Shade_evtNwkSetup, /* openthread network is setup */
79  Shade_evtDevRoleChanged, /* Events for Device State */
80  Shade_evtKeyLeft, /* Left Key is pressed */
81  Shade_evtKeyRight, /* Right key is pressed */
82  Shade_evtNwkJoined, /* Joined the network */
83  Shade_evtNwkJoinFailure, /* Failed joining network */
84 #if TIOP_CUI
85  Shade_evtProcessMenuUpdate, /* CUI Menu Event is triggered */
86  Shade_evtNwkAttach, /* CUI Menu Attach option is selected */
87  Shade_evtNwkJoin, /* CUI Menu Join option is selected */
88 #endif /* TIOP_CUI */
89 } Shade_evt_t;
90 
91 /******************************************************************************
92  External functions
93  *****************************************************************************/
94 
101 extern void Shade_postEvt(Shade_evt_t event);
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* _SHADE_H_ */
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:82
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:79
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:81
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:76
Shade_evt_t
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:73
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:83
void Shade_postEvt(Shade_evt_t event)
Posts an event to the Shade task.
Definition: CC1352P_2_LAUNCHXL/thread/shade/shade.c:575
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:77
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:75
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:80
Definition: CC2652RB_LAUNCHXL/thread/shade/shade.h:78
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale