drv_spi.h 556 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-01-24 wangyq the first version
  9. */
  10. #ifndef DRV_SPI_H__
  11. #define DRV_SPI_H__
  12. #include <rtthread.h>
  13. #include <rthw.h>
  14. #include <rtdevice.h>
  15. struct es32f0_hw_spi_cs
  16. {
  17. rt_uint32_t pin;
  18. };
  19. /* cannot be used before completion init */
  20. rt_err_t es32f0_spi_device_attach(rt_uint32_t pin, const char *bus_name, const char *device_name);
  21. int rt_hw_spi_init(void);
  22. #endif