【发布时间】:2021-02-03 21:49:50
【问题描述】:
所以我在查看 Microchip 的 dsPIC MCU 头文件时偶然发现了这个结构:
/* Generic structure of entire SFR area for each UART module */
typedef struct tagUART {
uint16_t uxmode;
uint16_t uxsta;
uint16_t uxtxreg;
uint16_t uxrxreg;
uint16_t uxbrg;
} UART, *PUART;
我似乎无法弄清楚这里的类型或实例是什么(以及这样做的目的是什么):
- 什么是tagUART?
- 什么是UART?
- 什么是*PUART?
【问题讨论】:
-
/questions/252780/why-should-we-typedef-a-struct-so-often-in-c -- 首先搜索“[c] typedef struct”。