Initial commit: TXW82x FPV v2.7.0.7-42229 SDK + project sources
This commit is contained in:
45
sdk/include/dev/uart/hguart_v2.h
Normal file
45
sdk/include/dev/uart/hguart_v2.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _HGUART_V2_H
|
||||
#define _HGUART_V2_H
|
||||
#include "hal/uart.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define __PSRAM_ADDR_START (0x28000000)
|
||||
#define __PSRAM_ADDR_END (0x28800000 + (0x1800000))
|
||||
|
||||
struct hguart_v2 {
|
||||
struct uart_device dev;
|
||||
uint32 hw;
|
||||
uart_irq_hdl irq_hdl;
|
||||
uint32 irq_data;
|
||||
uint16 irq_num;
|
||||
uint16 opened:1, dsleep:1, use_dma:1;
|
||||
uint32 flag;
|
||||
#ifdef CONFIG_SLEEP
|
||||
struct {
|
||||
uint32 con;
|
||||
uint32 baud;
|
||||
uint32 tstadr;
|
||||
uint32 rstadr;
|
||||
uint32 tdmalen;
|
||||
uint32 rdmalen;
|
||||
uint32 dmacon;
|
||||
uint32 rs485_con;
|
||||
uint32 rs485_det;
|
||||
uint32 rs485_tat;
|
||||
uint32 tocon;
|
||||
}bp_regs;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
int32 hguart_v2_attach(uint32 dev_id, struct hguart_v2 *uart);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user