-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a src/platform/Darwin and get it to link with the iOS demo app #1497
Merged
woody-apple
merged 1 commit into
project-chip:master
from
vivien-apple:Darwin_AddPlatform
Jul 8, 2020
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* Platform-specific configuration overrides for the CHIP BLE | ||
* Layer on Darwin platforms. | ||
* | ||
*/ | ||
|
||
#ifndef BLE_PLATFORM_CONFIG_H | ||
#define BLE_PLATFORM_CONFIG_H | ||
|
||
// ==================== Platform Adaptations ==================== | ||
|
||
#define BLE_CONNECTION_OBJECT uint16_t | ||
#define BLE_CONNECTION_UNINITIALIZED ((uint16_t) -1) | ||
#define BLE_MAX_RECEIVE_WINDOW_SIZE 5 | ||
|
||
// ========== Platform-specific Configuration Overrides ========= | ||
|
||
/* none so far */ | ||
|
||
#endif // BLE_PLATFORM_CONFIG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* Platform-specific configuration overrides for the chip Device Layer | ||
* on Darwin platforms. | ||
*/ | ||
|
||
#ifndef CHIP_DEVICE_PLATFORM_CONFIG_H | ||
#define CHIP_DEVICE_PLATFORM_CONFIG_H | ||
|
||
// ==================== Platform Adaptations ==================== | ||
|
||
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 | ||
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 | ||
|
||
#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 | ||
|
||
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0 | ||
|
||
#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 | ||
#define CHIP_DEVICE_CONFIG_ENABLE_SERVICE_DIRECTORY_TIME_SYNC 0 | ||
|
||
#define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY 2 | ||
#define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY 3 | ||
#define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY 4 | ||
#define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY 5 | ||
|
||
// ========== Platform-specific Configuration ========= | ||
|
||
// These are configuration options that are unique to Darwin platforms. | ||
// These can be overridden by the application as needed. | ||
|
||
/** | ||
* @def CHIP_DEVICE_LAYER_BLE_OBSERVER_PRIORITY | ||
* | ||
* The priority of the SoftDevice observer event handler registered by the | ||
* CHIP BleLayer. | ||
*/ | ||
#ifndef CHIP_DEVICE_LAYER_BLE_OBSERVER_PRIORITY | ||
#define CHIP_DEVICE_LAYER_BLE_OBSERVER_PRIORITY 3 | ||
#endif // CHIP_DEVICE_LAYER_BLE_OBSERVER_PRIORITY | ||
|
||
/** | ||
* @def CHIP_DEVICE_LAYER_BLE_CONN_CFG_TAG | ||
* | ||
* The SoftDevice BLE connection configuration tag used by the CHIP | ||
* BleLayer. | ||
*/ | ||
#ifndef CHIP_DEVICE_LAYER_BLE_CONN_CFG_TAG | ||
#define CHIP_DEVICE_LAYER_BLE_CONN_CFG_TAG 1 | ||
#endif // CHIP_DEVICE_LAYER_BLE_CONN_CFG_TAG | ||
|
||
// ========== Platform-specific Configuration Overrides ========= | ||
|
||
#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE | ||
#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 8192 | ||
#endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE | ||
|
||
#ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE | ||
#define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE 8192 | ||
#endif // CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE | ||
|
||
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY 0 | ||
#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY 0 | ||
#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0 | ||
#define CHIP_DEVICE_CONFIG_ENABLE_TUNNEL_TELEMETRY 0 | ||
|
||
// TODO: CHIP has redesigned the crypto interface, pending on the final version of CHIP HASH APIs | ||
#define CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 0 | ||
|
||
#endif // CHIP_DEVICE_PLATFORM_CONFIG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* Defines platform-specific event types and data for the chip | ||
* Device Layer on Darwin platforms. | ||
*/ | ||
|
||
#ifndef CHIP_DEVICE_PLATFORM_EVENT_H | ||
#define CHIP_DEVICE_PLATFORM_EVENT_H | ||
|
||
#include <platform/CHIPDeviceEvent.h> | ||
|
||
namespace chip { | ||
namespace System { | ||
class PacketBuffer; | ||
} | ||
} // namespace chip | ||
|
||
namespace chip { | ||
namespace DeviceLayer { | ||
|
||
namespace DeviceEventType { | ||
|
||
/** | ||
* Enumerates platform-specific event types that are visible to the application. | ||
*/ | ||
enum PublicPlatformSpecificEventTypes | ||
{ | ||
/* None currently defined */ | ||
}; | ||
|
||
/** | ||
* Enumerates platform-specific event types that are internal to the chip Device Layer. | ||
*/ | ||
enum InternalPlatformSpecificEventTypes | ||
{ | ||
kPlatformDarwinEvent = kRange_InternalPlatformSpecific, | ||
kPlatformDarwinBleC1WriteEvent, | ||
kPlatformDarwinBleOutOfBuffersEvent, | ||
}; | ||
|
||
} // namespace DeviceEventType | ||
|
||
/** | ||
* Represents platform-specific event information for Linux platforms. | ||
*/ | ||
struct ChipDevicePlatformEvent final | ||
{ | ||
union | ||
{ | ||
struct | ||
{ | ||
uint16_t ConnId; | ||
::chip::System::PacketBuffer * Data; | ||
} BleC1WriteEvent; | ||
}; | ||
}; | ||
|
||
} // namespace DeviceLayer | ||
} // namespace chip | ||
|
||
#endif // CHIP_DEVICE_PLATFORM_EVENT_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darwin * platforms