init_p6Platform.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. *
  3. * Copyright (c) 2021 Project CHIP Authors
  4. * Copyright (c) 2019 Google LLC.
  5. * All rights reserved.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. #include "AppConfig.h"
  20. #include <platform/CHIPDeviceLayer.h>
  21. #include <support/CHIPPlatformMemory.h>
  22. #include <assert.h>
  23. #include <string.h>
  24. #if CHIP_ENABLE_OPENTHREAD
  25. #include <openthread-core-config.h>
  26. #include <openthread/cli.h>
  27. #include <openthread/config.h>
  28. #include <openthread/dataset.h>
  29. #include <openthread/error.h>
  30. #include <openthread/heap.h>
  31. #include <openthread/icmp6.h>
  32. #include <openthread/instance.h>
  33. #include <openthread/link.h>
  34. #include <openthread/platform/openthread-system.h>
  35. #include <openthread/platform/uart.h>
  36. #include <openthread/tasklet.h>
  37. #include <openthread/thread.h>
  38. #if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
  39. #include "openthread/heap.h"
  40. #include "sl_malloc.h"
  41. #endif // OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
  42. #endif // CHIP_ENABLE_OPENTHREAD
  43. #include <cy_retarget_io.h>
  44. #include <cybsp.h>
  45. #include <cyhal.h>
  46. void init_p6Platform(void)
  47. {
  48. /* Initialize the board support package */
  49. cybsp_init();
  50. /* Initialize retarget-io to use the debug UART port */
  51. cy_retarget_io_init(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX, CY_RETARGET_IO_BAUDRATE);
  52. }