Welcome to mirror list, hosted at ThFree Co, Russian Federation.

zcl.custom_matrix.h « st_custom « zcl « include « stack « zigbee « STM32_WPAN « ST « Middlewares - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f7f48a66cf4c64dfbb0b7e0e503a8bbf2980172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*****************************************************************************
 * @file    zcl.custom_matrix.h
 * @author  MCD Application Team
 * @brief   This file contains the interface of the Custom Matrix cluster.
 *
 *****************************************************************************
 * @attention
 *
 * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
 * All rights reserved.</center></h2>
 *
 * This software component is licensed by ST under Ultimate Liberty license
 * SLA0044, the "License"; You may not use this file except in compliance with
 * the License. You may obtain a copy of the License at:
 *                             www.st.com/SLA0044
 *
 ******************************************************************************
 */


#ifndef ZCL_CUSTOM_MATRIX_H
#define ZCL_CUSTOM_MATRIX_H

/*--------------------------------------------------------------------------
 *  DESCRIPTION
 *      Interface definition for the Custom Matrix cluster.
 *--------------------------------------------------------------------------
 */

/* Attribute Identifiers */
enum {
    ZCL_CUSTOM_MATRIX_ATTR = 0x0000,
     };

/* Commands */
#define ZCL_SET_CUSTOM_MATRIX_COMMAND_REQ          0x00
#define ZCL_CUSTOM_MATRIX_COMMAND_RSP              0x01

/* Request structures */
struct set_custom_matrix_command_req_t {
    uint8_t pattern_code;
};


/* Response Structures */
struct custom_matrix_command_rsp_t {
    uint16_t one;
};


enum ZclStatusCodeT
ZbZclSet_custom_matrix_ClientCommand(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst, uint8_t pattern_code,
    void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

/* Callbacks */
struct zcl_custom_matrix_server_callbacks_t {
    enum ZclStatusCodeT (*set_custom_matrix_command)(struct ZbZclClusterT *clusterPtr, \
        struct set_custom_matrix_command_req_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg);
//    enum ZclStatusCodeT (*get_custom_ls_command)(struct ZbZclClusterT *clusterPtr, \
//        struct set_custom_ls_command_req_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg);
};

/* Allocation Functions */
struct ZbZclClusterT * ZbZcl_custom_matrix_ClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
struct ZbZclClusterT * ZbZcl_custom_matrix_ServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, \
          struct zcl_custom_matrix_server_callbacks_t *callbacks, void *arg);

#endif /* ZCL_CUSTOM_MATRIX_H */