drv_spi.h 726 B

123456789101112131415161718192021222324
  1. /*
  2. * File : gpio.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2015, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2017-10-20 ZYH the first version
  13. */
  14. #ifndef __STM32_SPI_H_
  15. #define __STM32_SPI_H_
  16. #include <rtthread.h>
  17. #include <rthw.h>
  18. #include <rtdevice.h>
  19. extern int stm32_spi_register_bus(SPI_TypeDef *SPIx, const char *name);
  20. extern rt_err_t stm32_spi_bus_attach_device(rt_uint32_t pin, const char *bus_name, const char *device_name);
  21. extern int stm32_hw_spi_init(void);
  22. #endif