3 * Copyright (c) 2020 Project CHIP Authors
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * Provides an implementation of the PlatformManager object for the QPG6100 platform.
25 #include <platform/internal/GenericPlatformManagerImpl_FreeRTOS.h>
28 namespace DeviceLayer {
31 * Concrete implementation of the PlatformManager singleton object for the platform.
33 class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>
35 // Allow the PlatformManager interface class to delegate method calls to
36 // the implementation methods provided by this class.
37 friend PlatformManager;
39 // Allow the generic implementation base class to call helper methods on
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 friend Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>;
46 // ===== Platform-specific members that may be accessed directly by the application.
51 // ===== Methods that implement the PlatformManager abstract interface.
53 CHIP_ERROR _InitChipStack(void);
55 // ===== Members for internal use by the following friends.
57 friend PlatformManager & PlatformMgr(void);
58 friend PlatformManagerImpl & PlatformMgrImpl(void);
59 friend class Internal::BLEManagerImpl;
61 static PlatformManagerImpl sInstance;
63 using Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>::PostEventFromISR;
67 * Returns the public interface of the PlatformManager singleton object.
69 * chip applications should use this to access features of the PlatformManager object
70 * that are common to all platforms.
72 inline PlatformManager & PlatformMgr(void)
74 return PlatformManagerImpl::sInstance;
78 * Returns the platform-specific implementation of the PlatformManager singleton object.
80 * chip applications can use this to gain access to features of the PlatformManager
81 * that are specific to the platform.
83 inline PlatformManagerImpl & PlatformMgrImpl(void)
85 return PlatformManagerImpl::sInstance;
88 } // namespace DeviceLayer