drv_spi.h 518 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2006-2018, Synwit Technology Co.,Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-12-10 Zohar_Lee first version
  9. */
  10. #ifndef DRV_SPI_H__
  11. #define DRV_SPI_H__
  12. #include <rtthread.h>
  13. struct swm320_spi_cs
  14. {
  15. rt_uint32_t pin;
  16. };
  17. //cannot be used before completion init
  18. static rt_err_t swm320_spi_bus_attach_device(rt_uint32_t pin,
  19. const char *bus_name,
  20. const char *device_name);
  21. int rt_hw_spi_init(void);
  22. #endif