w5500_device.c 447 B

12345678910111213141516171819
  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. * 2018-11-26 BalanceTWK add port file
  9. */
  10. #include "drv_spi.h"
  11. #include "board.h"
  12. #include "drv_gpio.h"
  13. int w5500_spi_device_init()
  14. {
  15. __HAL_RCC_GPIOB_CLK_ENABLE();
  16. return rt_hw_spi_device_attach("spi2","spi20",GPIOB,GPIO_PIN_12);
  17. }
  18. INIT_DEVICE_EXPORT(w5500_spi_device_init);