1
0

nrf24l01_init.c 456 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-06-29 WillianChan first version
  9. */
  10. #include <rtthread.h>
  11. #ifdef PKG_USING_NRF24L01
  12. #include "drv_spi.h"
  13. static int rt_hw_nrf24l01_init(void)
  14. {
  15. rt_hw_spi_device_attach("spi2", "spi20", GPIOG, GPIO_PIN_7);
  16. return RT_EOK;
  17. }
  18. INIT_COMPONENT_EXPORT(rt_hw_nrf24l01_init);
  19. #endif