⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fpgainc.h

📁 全面模仿AVR的UART功能
💻 H
字号:
#ifndef __FPGAINC_H
#define __FPGAINC_H

#define X_PORTA     (*(volatile unsigned char *)0x1100)
#define X_DDRA      (*(volatile unsigned char *)0x1101)
#define X_SETA      (*(volatile unsigned char *)0x1102)
#define X_CLRA      (*(volatile unsigned char *)0x1103)

#define X_PORTB     (*(volatile unsigned char *)0x2200)
#define X_DDRB      (*(volatile unsigned char *)0x2201)
#define X_SETB      (*(volatile unsigned char *)0x2202)
#define X_CLRB      (*(volatile unsigned char *)0x2203)

/*
 *  定义FPGA配置的UART寄存器地址映射
 */
#define FPGA_UDR    (*(volatile unsigned char *)0x1200)
#define FPGA_UCSRA  (*(volatile unsigned char *)0x1201)
#define FPGA_UCSRB  (*(volatile unsigned char *)0x1202)
#define FPGA_UCSRC  (*(volatile unsigned char *)0x1203)
#define FPGA_UBRRH  (*(volatile unsigned char *)0x1204)
#define FPGA_UBRRL  (*(volatile unsigned char *)0x1205)

#endif  //  #ifndef __FPGAINC_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -