Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright (c) 2020 Project CHIP Authors |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | /** |
| 19 | * @file |
| 20 | * Defines platform-specific event types and data for the chip |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 21 | * Device Layer on Qorvo QPG platforms. |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 22 | */ |
| 23 | |
Andrei Litvin | 1873e8c | 2020-10-12 10:52:26 -0400 | [diff] [blame] | 24 | #pragma once |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 25 | |
| 26 | #include <platform/CHIPDeviceEvent.h> |
| 27 | |
| 28 | namespace chip { |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 29 | namespace DeviceLayer { |
| 30 | |
| 31 | namespace DeviceEventType { |
| 32 | |
| 33 | /** |
| 34 | * Enumerates platform-specific event types that are visible to the application. |
| 35 | */ |
| 36 | enum PublicPlatformSpecificEventTypes |
| 37 | { |
| 38 | /* None currently defined */ |
| 39 | }; |
| 40 | |
| 41 | /** |
| 42 | * Enumerates platform-specific event types that are internal to the chip Device Layer. |
| 43 | */ |
| 44 | enum InternalPlatformSpecificEventTypes |
| 45 | { |
| 46 | kQorvoBLEConnected = kRange_InternalPlatformSpecific, |
| 47 | kQorvoBLEDisconnected, |
| 48 | kCHIPoBLECCCWriteEvent, |
| 49 | kCHIPoBLERXCharWriteEvent, |
| 50 | kCHIPoBLETXCharWriteEvent, |
| 51 | }; |
| 52 | |
| 53 | } // namespace DeviceEventType |
| 54 | |
| 55 | /** |
| 56 | * Represents platform-specific event information. |
| 57 | */ |
| 58 | struct ChipDevicePlatformEvent final |
| 59 | { |
| 60 | // TODO - add platform specific definition extension |
| 61 | union |
| 62 | { |
| 63 | struct |
| 64 | { |
| 65 | uint8_t dummy; |
| 66 | } QorvoBLEConnected; |
| 67 | struct |
| 68 | { |
| 69 | uint8_t dummy; |
| 70 | } CHIPoBLECCCWriteEvent; |
| 71 | struct |
| 72 | { |
| 73 | uint8_t dummy; |
| 74 | } CHIPoBLERXCharWriteEvent; |
| 75 | struct |
| 76 | { |
| 77 | uint8_t dummy; |
| 78 | } CHIPoBLETXCharWriteEvent; |
| 79 | }; |
| 80 | }; |
| 81 | |
| 82 | } // namespace DeviceLayer |
| 83 | } // namespace chip |