pure sdk for main

This commit is contained in:
divadiow
2025-08-27 09:51:58 +01:00
parent f0d033f1c9
commit 0571416e7c
3283 changed files with 1577720 additions and 1 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef _HG_XSPI_H_
#define _HG_XSPI_H_
#include "hal/spi.h"
#ifdef __cplusplus
extern "C" {
#endif
enum hg_xspi_flags {
hg_xspi_flags_ready,
hg_xspi_flags_suspend,
};
struct hg_xspi {
struct dev_obj dev;
void *hw;
uint32 irq_num;
//qspi_irq_hdl irq_hdl;
uint32 irq_data;
uint32 opened;
uint32 flags;
#ifdef CONFIG_SLEEP
uint32 sys_regs[6];
uint32 ospi_regs[256/4];
#endif
};
extern struct hg_xspi xspi;
int32 hg_xspi_attach(uint32 dev_id, struct hg_xspi *p_spi);
void hg_xspi_sample_offset(uint32 ospi_base, int8 rx_offset, int8 tx_offset);
#ifdef __cplusplus
}
#endif
#endif