Sherman 0f0093aa3e [UPDATE]添加新驱动、完善 BSP
- [update] 更新 template 工程配置
 - [update] 更新 PLATFORM 配置
 - [add] 添加 ra icu 驱动文件
 - [add] 增加传感器类型 IAQ、EtOH
 - [add] 添加 CAN 驱动
 - [add] 添加 RW007 驱动及使用说明
 - [fix] GCC 编译问题
 - [fix] flash 驱动
 - [fix] 修改 scons 脚本配置
2021-12-14 11:04:46 +08:00

52 lines
1019 B
C

/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-08-23 Mr.Tiger first version
*/
#ifndef __DRV_SPI_H__
#define __DRV_SPI_H__
#include <rtthread.h>
#include <rtdevice.h>
#include "hal_data.h"
#include "board.h"
#include <rthw.h>
#include <drv_common.h>
#include <drv_config.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef R_SPI_H
struct ra_spi_handle
{
const char bus_name[RT_NAME_MAX];
const spi_cfg_t *spi_cfg_t;
const spi_instance_ctrl_t *spi_ctrl_t;
};
struct ra_spi
{
rt_uint32_t cs_pin;
struct ra_spi_handle *ra_spi_handle_t;
struct rt_spi_configuration *rt_spi_cfg_t;
struct rt_spi_bus bus;
};
#endif
void rt_hw_spi_device_attach(struct rt_spi_device *device, const char *device_name, const char *bus_name, void *user_data);
#ifdef __cplusplus
}
#endif
/* stm32 spi dirver class */
#endif /*__DRV_SPI_H__ */