3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2020 Texas Instruments Incorporated
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * Provides an implementation of the PlatformManager object.
26 #include <platform/internal/GenericPlatformManagerImpl_FreeRTOS.h>
29 namespace DeviceLayer {
32 * Concrete implementation of the PlatformManager singleton object for the
33 * CC13X2_26X2 platform.
35 class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>
37 // Allow the PlatformManager interface class to delegate method calls to
38 // the implementation methods provided by this class.
39 friend PlatformManager;
41 // Allow the generic implementation base class to call helper methods on
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 friend Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>;
48 // ===== Platform-specific members that may be accessed directly by the application.
53 // ===== Methods that implement the PlatformManager abstract interface.
55 CHIP_ERROR _InitChipStack(void);
57 // ===== Members for internal use by the following friends.
59 friend PlatformManager & PlatformMgr(void);
60 friend PlatformManagerImpl & PlatformMgrImpl(void);
61 friend class Internal::BLEManagerImpl;
63 static PlatformManagerImpl sInstance;
65 using Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>::PostEventFromISR;
69 * Returns the public interface of the PlatformManager singleton object.
71 * chip applications should use this to access features of the PlatformManager
72 * object that are common to all platforms.
74 inline PlatformManager & PlatformMgr(void)
76 return PlatformManagerImpl::sInstance;
80 * Returns the platform-specific implementation of the PlatformManager
83 * chip applications can use this to gain access to features of the
84 * PlatformManager that are specific to the CC1352 SoC.
86 inline PlatformManagerImpl & PlatformMgrImpl(void)
88 return PlatformManagerImpl::sInstance;
91 } // namespace DeviceLayer