luobeihai 2da43febbd
add some apm32 bsp and fix apm32f0/apm32f1 gcc startup assembly file bug and fix apm32 drv_eth.c bug (#6855)
* add some apm32 bsp and fix apm32f0/apm32f4 gcc startup assembly file bug and fix drv_eth.c bug

* fix apm32f103xe-minibroard and apm32f407ig-minibroard link.lds file error

* replace apm32f051r8-evalboard picture

* fix apm32f1 gcc assembly startup file suffix name

* renamed startup_apm32f10x_md.s/startup_apm32f10x_hd.s file and modify apm32f103xe-minibroard/board SConscript file
2023-01-15 21:16:02 -05:00

39 lines
707 B
C

/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-03-04 stevetong459 first version
*/
#ifndef __DRV_SPI_H__
#define __DRV_SPI_H__
#include "board.h"
#include <rtthread.h>
#include <drivers/spi.h>
struct apm32_spi_config
{
SPI_T *spi_x;
char *spi_bus_name;
};
struct apm32_spi
{
struct apm32_spi_config *config;
struct rt_spi_bus spi_bus;
};
struct apm32_spi_cs
{
GPIO_T *GPIOx;
uint16_t GPIO_Pin;
};
rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, GPIO_T *cs_gpiox, uint16_t cs_gpio_pin);
#endif /*__DRV_SPI_H__ */