初始版本

This commit is contained in:
2026-04-23 13:49:53 +08:00
parent c1d6ebd38c
commit ac718a463a
257 changed files with 265681 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef __HDL_SPI4_H_
#define __HDL_SPI4_H_
#include "hc32_ll.h"
#include "hdl_clk.h"
//logic spi4
#define SPI4_CLOCK FCG1_PERIPH_SPI1
#define SPI4_INSTANCE CM_SPI1
#define SPI4_SCLK_PORT GPIO_PORT_A
#define SPI4_SCLK_PIN GPIO_PIN_03
#define SPI4_SCLK_FUNC GPIO_FUNC_43
#define SPI4_MISO_PORT GPIO_PORT_A
#define SPI4_MISO_PIN GPIO_PIN_01
#define SPI4_MISO_FUNC GPIO_FUNC_41
#define SPI4_MOSI_PORT GPIO_PORT_A
#define SPI4_MOSI_PIN GPIO_PIN_04
#define SPI4_MOSI_FUNC GPIO_FUNC_40
void hdl_spi4_init(void);
uint8_t hdl_spi4_txrx(uint8_t w_data);
#endif