Advertisement
tranthudo

app_device_config.h

Jun 4th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.10 KB | None | 0 0
  1. /*****************************************************************************
  2.  *
  3.  * MODULE:             JN-AN-1220 ZLO Sensor Demo
  4.  *
  5.  * COMPONENT:          app_device_config.h
  6.  *
  7.  * DESCRIPTION:        DK4 (DR1175) Button Press detection (Implementation)
  8.  *
  9.  ****************************************************************************
  10.  *
  11.  * This software is owned by NXP B.V. and/or its supplier and is protected
  12.  * under applicable copyright laws. All rights are reserved. We grant You,
  13.  * and any third parties, a license to use this software solely and
  14.  * exclusively on NXP products [NXP Microcontrollers such as JN5168, JN5179].
  15.  * You, and any third parties must reproduce the copyright and warranty notice
  16.  * and any other legend of ownership on each copy or partial copy of the
  17.  * software.
  18.  *
  19.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  20.  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22.  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  23.  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24.  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25.  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26.  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27.  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28.  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  29.  * POSSIBILITY OF SUCH DAMAGE.
  30.  *
  31.  * Copyright NXP B.V. 2017. All rights reserved
  32.  *
  33.  ***************************************************************************/
  34.  
  35. #ifndef APP_DEVICE_CONFIG_H_
  36. #define APP_DEVICE_CONFIG_H_
  37.  
  38. /****************************************************************************/
  39. /***        Include Files                                                 ***/
  40. /****************************************************************************/
  41. #include <jendefs.h>
  42. #include "zcl_options.h"
  43. #include "Basic.h"
  44.  
  45. /****************************************************************************/
  46. /***        Macro Definitions                                             ***/
  47. /****************************************************************************/
  48. #ifdef CLD_BAS_ATTR_MAN_SPEC_LED_INTENSITY
  49. #define DEVICE_CONFIG_LED_INTENSITY_BIT     (1 << 0)
  50. #endif
  51.  
  52. #ifdef CLD_BAS_ATTR_MAN_SPEC_VIBRATION_INTENSITY
  53. #define DEVICE_CONFIG_VIBRATION_INTENSITY_BIT  (1 << 1)
  54. #endif
  55.  
  56. /****************************************************************************/
  57. /***        Type Definitions                                              ***/
  58. /****************************************************************************/
  59.  
  60. typedef struct
  61. {
  62.     uint8 u8LedIntensity;
  63.     uint8 u8VibrationIntensity;
  64. }tsDeviceConfigParams;
  65.  
  66. typedef BOOL_T (*tfpDeviceConfigCb) (uint8 u8UpdateMask,
  67.                                    tsDeviceConfigParams* psDeviceConfigParam);
  68.  
  69. typedef struct
  70. {
  71.     tsDeviceConfigParams sDeviceConfigParams;
  72.     tfpDeviceConfigCb pCallbackFunction;
  73. }tsDeviceConfig;
  74.  
  75. /****************************************************************************/
  76. /***        Exported Functions                                            ***/
  77. /****************************************************************************/
  78. PUBLIC BOOL_T bDeviceConfig_UpdateConfig(uint8 u8ParamId,
  79.                                          void* pParam);
  80. PUBLIC BOOL_T bDeviceConfig_LoadConfig(tsCLD_Basic* psBasicServerCluster);
  81. PUBLIC BOOL_T bDeviceConfig_RegisterCallback(tfpDeviceConfigCb pfCallBack);
  82.  
  83. /****************************************************************************/
  84. /***        External Variables                                            ***/
  85. /****************************************************************************/
  86.  
  87. /****************************************************************************/
  88. /****************************************************************************/
  89. /****************************************************************************/
  90.  
  91. #endif /*APP_DEVICE_CONFIG_H_*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement