[rx] mannual formatted

This commit is contained in:
Meco Man 2021-03-29 07:13:22 +08:00
parent 1ba020f3c8
commit b88e579b62
5 changed files with 80 additions and 80 deletions

View File

@ -2,10 +2,10 @@
#define __BOARD_H__ #define __BOARD_H__
#define XTAL_FREQUENCY (12000000L) #define XTAL_FREQUENCY (12000000L)
#define ICLK_MUL (8) #define ICLK_MUL (8)
#define PCLK_MUL (4) #define PCLK_MUL (4)
#define BCLK_MUL (2) #define BCLK_MUL (2)
#define RX62N_SRAM_END 0x0000ffff #define RX62N_SRAM_END 0x0000ffff

View File

@ -22,18 +22,18 @@
/* Clock selection control */ /* Clock selection control */
#define SCI_CKS_MIN 0 #define SCI_CKS_MIN 0
#define SCI_CKS_MAX 3 #define SCI_CKS_MAX 3
#define SCI_CKS_STEP 1 #define SCI_CKS_STEP 1
#define IPR_ADDRESS(a) ((volatile unsigned char *)&ICU.IPR[IPR_SCI0_ + a]) #define IPR_ADDRESS(a) ((volatile unsigned char *)&ICU.IPR[IPR_SCI0_ + a])
//#define IER_ADDRESS(a) ((volatile unsigned char *)&(ICU.IER[IER_SCI0_ERI0 + a])/sizeof(unsigned char)) //#define IER_ADDRESS(a) ((volatile unsigned char *)&(ICU.IER[IER_SCI0_ERI0 + a])/sizeof(unsigned char))
#define ERI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_ERI0] + ((4 * a) / sizeof(unsigned char)) ) #define ERI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_ERI0] + ((4 * a) / sizeof(unsigned char)) )
#define IER_ADDRESS(a) ((volatile unsigned char *)&ICU.IER[IER_SCI0_ERI0] + ((4 * a) / sizeof(unsigned char)) ) #define IER_ADDRESS(a) ((volatile unsigned char *)&ICU.IER[IER_SCI0_ERI0] + ((4 * a) / sizeof(unsigned char)) )
#define RXI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_RXI0] + ((4 * a) / sizeof(unsigned char)) ) #define RXI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_RXI0] + ((4 * a) / sizeof(unsigned char)) )
#define TXI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_TXI0] + ((4 * a) / sizeof(unsigned char)) ) #define TXI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_TXI0] + ((4 * a) / sizeof(unsigned char)) )
#define TEI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_TEI0] + ((4 * a) / sizeof(unsigned char)) ) #define TEI_ADDRESS(a) ((volatile unsigned char *)&ICU.IR[IR_SCI0_TEI0] + ((4 * a) / sizeof(unsigned char)) )
#define RXI_DTCER_ADDRESS(a) (( volatile unsigned char *)&ICU.DTCER[IR_SCI0_RXI0]+ ((4*a)/sizeof(unsigned char))) #define RXI_DTCER_ADDRESS(a) (( volatile unsigned char *)&ICU.DTCER[IR_SCI0_RXI0]+ ((4*a)/sizeof(unsigned char)))
#define TXI_DTCER_ADDRESS(a) (( volatile unsigned char *)&ICU.DTCER[IR_SCI0_TXI0]+ ((4*a) / sizeof(unsigned char))) #define TXI_DTCER_ADDRESS(a) (( volatile unsigned char *)&ICU.DTCER[IR_SCI0_TXI0]+ ((4*a) / sizeof(unsigned char)))
//#define SCI1_USE_B //#define SCI1_USE_B
@ -44,8 +44,8 @@
#define SourceClk 12000000 #define SourceClk 12000000
#define rpdl_CGC_f_pclk SourceClk * 4 #define rpdl_CGC_f_pclk SourceClk * 4
/* Idle output options */ /* Idle output options */
#define SPACE 0 #define SPACE 0
#define MARK 1 #define MARK 1
typedef int UART_ID_Type; typedef int UART_ID_Type;
typedef int IRQn_Type; typedef int IRQn_Type;
@ -528,7 +528,7 @@ void rt_hw_uart_init(void)
config.parity = PARITY_NONE; config.parity = PARITY_NONE;
config.stop_bits = STOP_BITS_1; config.stop_bits = STOP_BITS_1;
config.invert = NRZ_NORMAL; config.invert = NRZ_NORMAL;
config.bufsz = RT_SERIAL_RB_BUFSZ; config.bufsz = RT_SERIAL_RB_BUFSZ;
serial2.ops = &rx_uart_ops; serial2.ops = &rx_uart_ops;
serial2.config = config; serial2.config = config;

View File

@ -3,16 +3,16 @@
#define __RTTHREAD_CFG_H__ #define __RTTHREAD_CFG_H__
/* RT_NAME_MAX*/ /* RT_NAME_MAX*/
#define RT_NAME_MAX 8 #define RT_NAME_MAX 8
/* RT_ALIGN_SIZE*/ /* RT_ALIGN_SIZE*/
#define RT_ALIGN_SIZE 4 #define RT_ALIGN_SIZE 4
/* PRIORITY_MAX */ /* PRIORITY_MAX */
#define RT_THREAD_PRIORITY_MAX 32 #define RT_THREAD_PRIORITY_MAX 32
/* Tick per Second */ /* Tick per Second */
#define RT_TICK_PER_SECOND 100 #define RT_TICK_PER_SECOND 100
/* SECTION: RT_DEBUG */ /* SECTION: RT_DEBUG */
/* Thread Debug */ /* Thread Debug */
@ -27,9 +27,9 @@
/* Using Software Timer */ /* Using Software Timer */
/* #define RT_USING_TIMER_SOFT */ /* #define RT_USING_TIMER_SOFT */
#define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 512 #define RT_TIMER_THREAD_STACK_SIZE 512
#define RT_TIMER_TICK_PER_SECOND 10 #define RT_TIMER_TICK_PER_SECOND 10
/* SECTION: IPC */ /* SECTION: IPC */
/* Using Semaphore*/ /* Using Semaphore*/
@ -72,9 +72,9 @@
/* SECTION: Console options */ /* SECTION: Console options */
#define RT_USING_CONSOLE #define RT_USING_CONSOLE
/* the buffer size of console*/ /* the buffer size of console*/
#define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLEBUF_SIZE 128
// <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" /> // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" />
#define RT_CONSOLE_DEVICE_NAME "uart2" #define RT_CONSOLE_DEVICE_NAME "uart2"
/* SECTION: finsh, a C-Express shell */ /* SECTION: finsh, a C-Express shell */
#define RT_USING_FINSH #define RT_USING_FINSH
@ -89,17 +89,17 @@
/* Reentrancy (thread safe) of the FatFs module. */ /* Reentrancy (thread safe) of the FatFs module. */
#define RT_DFS_ELM_REENTRANT #define RT_DFS_ELM_REENTRANT
/* Number of volumes (logical drives) to be used. */ /* Number of volumes (logical drives) to be used. */
#define RT_DFS_ELM_DRIVES 2 #define RT_DFS_ELM_DRIVES 2
/* #define RT_DFS_ELM_USE_LFN 1 */ /* #define RT_DFS_ELM_USE_LFN 1 */
/* #define RT_DFS_ELM_CODE_PAGE 936 */ /* #define RT_DFS_ELM_CODE_PAGE 936 */
#define RT_DFS_ELM_MAX_LFN 255 #define RT_DFS_ELM_MAX_LFN 255
/* Maximum sector size to be handled. */ /* Maximum sector size to be handled. */
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512 #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
/* the max number of mounted filesystem */ /* the max number of mounted filesystem */
#define DFS_FILESYSTEMS_MAX 2 #define DFS_FILESYSTEMS_MAX 2
/* the max number of opened files */ /* the max number of opened files */
#define DFS_FD_MAX 4 #define DFS_FD_MAX 4
/* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* #define RT_USING_LWIP */ /* #define RT_USING_LWIP */
@ -113,49 +113,49 @@
#define RT_LWIP_DNS #define RT_LWIP_DNS
/* the number of simulatenously active TCP connections*/ /* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM 5 #define RT_LWIP_TCP_PCB_NUM 5
/* Using DHCP */ /* Using DHCP */
/* #define RT_LWIP_DHCP */ /* #define RT_LWIP_DHCP */
/* ip address of target*/ /* ip address of target*/
#define RT_LWIP_IPADDR0 192 #define RT_LWIP_IPADDR0 192
#define RT_LWIP_IPADDR1 168 #define RT_LWIP_IPADDR1 168
#define RT_LWIP_IPADDR2 1 #define RT_LWIP_IPADDR2 1
#define RT_LWIP_IPADDR3 30 #define RT_LWIP_IPADDR3 30
/* gateway address of target*/ /* gateway address of target*/
#define RT_LWIP_GWADDR0 192 #define RT_LWIP_GWADDR0 192
#define RT_LWIP_GWADDR1 168 #define RT_LWIP_GWADDR1 168
#define RT_LWIP_GWADDR2 1 #define RT_LWIP_GWADDR2 1
#define RT_LWIP_GWADDR3 1 #define RT_LWIP_GWADDR3 1
/* mask address of target*/ /* mask address of target*/
#define RT_LWIP_MSKADDR0 255 #define RT_LWIP_MSKADDR0 255
#define RT_LWIP_MSKADDR1 255 #define RT_LWIP_MSKADDR1 255
#define RT_LWIP_MSKADDR2 255 #define RT_LWIP_MSKADDR2 255
#define RT_LWIP_MSKADDR3 0 #define RT_LWIP_MSKADDR3 0
/* tcp thread options */ /* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 12 #define RT_LWIP_TCPTHREAD_PRIORITY 12
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 10 #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024 #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
/* ethernet if thread options */ /* ethernet if thread options */
#define RT_LWIP_ETHTHREAD_PRIORITY 15 #define RT_LWIP_ETHTHREAD_PRIORITY 15
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 10 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
#define RT_LWIP_ETHTHREAD_STACKSIZE 512 #define RT_LWIP_ETHTHREAD_STACKSIZE 512
/* TCP sender buffer space */ /* TCP sender buffer space */
#define RT_LWIP_TCP_SND_BUF 8192 #define RT_LWIP_TCP_SND_BUF 8192
/* TCP receive window. */ /* TCP receive window. */
#define RT_LWIP_TCP_WND 8192 #define RT_LWIP_TCP_WND 8192
/* SECTION: RT-Thread/GUI */ /* SECTION: RT-Thread/GUI */
/* #define RT_USING_RTGUI */ /* #define RT_USING_RTGUI */
/* name length of RTGUI object */ /* name length of RTGUI object */
#define RTGUI_NAME_MAX 12 #define RTGUI_NAME_MAX 12
/* support 16 weight font */ /* support 16 weight font */
#define RTGUI_USING_FONT16 #define RTGUI_USING_FONT16
/* support Chinese font */ /* support Chinese font */
@ -171,7 +171,7 @@
/* use mouse cursor */ /* use mouse cursor */
/* #define RTGUI_USING_MOUSE_CURSOR */ /* #define RTGUI_USING_MOUSE_CURSOR */
/* default font size in RTGUI */ /* default font size in RTGUI */
#define RTGUI_DEFAULT_FONT_SIZE 16 #define RTGUI_DEFAULT_FONT_SIZE 16
/* image support */ /* image support */
/* #define RTGUI_IMAGE_XPM */ /* #define RTGUI_IMAGE_XPM */