formatting code
This commit is contained in:
parent
7fb8246307
commit
4f0002525c
@ -16,19 +16,19 @@
|
|||||||
|
|
||||||
#include "drv_gpio.h"
|
#include "drv_gpio.h"
|
||||||
|
|
||||||
#define SPI_FREQ_HZ (10000000UL)
|
#define SPI_FREQ_HZ (10000000UL)
|
||||||
|
|
||||||
/* gd32 spi dirver class */
|
/* gd32 spi dirver class */
|
||||||
struct ifx_spi
|
struct ifx_spi
|
||||||
{
|
{
|
||||||
char *bus_name;
|
char *bus_name;
|
||||||
struct rt_spi_bus *spi_bus;
|
struct rt_spi_bus *spi_bus;
|
||||||
cyhal_spi_t *spi_obj;
|
cyhal_spi_t *spi_obj;
|
||||||
|
|
||||||
uint16_t sck_pin;
|
uint16_t sck_pin;
|
||||||
uint16_t miso_pin;
|
uint16_t miso_pin;
|
||||||
uint16_t mosi_pin;
|
uint16_t mosi_pin;
|
||||||
uint32_t freq;
|
uint32_t freq;
|
||||||
};
|
};
|
||||||
|
|
||||||
rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, uint16_t cs_gpio_pin);
|
rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, uint16_t cs_gpio_pin);
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2022-06-29 Rbb666 first version
|
* 2022-06-29 Rbb666 first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "drv_uart.h"
|
#include "drv_uart.h"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2022-07-19 Rbbb666 first version
|
* 2022-07-19 Rbbb666 first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user