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 11 #include <rtthread.h> 12 13 #ifdef PKG_USING_NRF24L01 14 15 #include "drv_spi.h" rt_hw_nrf24l01_init(void)16static int rt_hw_nrf24l01_init(void) 17 { 18 rt_hw_spi_device_attach("spi2", "spi20", GET_PIN(G, 7)); 19 return RT_EOK; 20 } 21 INIT_COMPONENT_EXPORT(rt_hw_nrf24l01_init); 22 23 #endif 24