2019-06-29 18:39:21 +08:00
|
|
|
/*
|
2021-12-13 11:36:51 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2019-06-29 18:39:21 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2019-06-29 WillianChan first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
|
|
|
#ifdef PKG_USING_NRF24L01
|
|
|
|
#include "drv_spi.h"
|
|
|
|
static int rt_hw_nrf24l01_init(void)
|
|
|
|
{
|
|
|
|
rt_hw_spi_device_attach("spi2", "spi20", GPIOD, GPIO_PIN_5);
|
|
|
|
return RT_EOK;
|
|
|
|
}
|
|
|
|
INIT_COMPONENT_EXPORT(rt_hw_nrf24l01_init);
|
2019-08-28 11:59:21 +08:00
|
|
|
#endif /* PKG_USING_NRF24L01 */
|