Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 特殊结构类型_C_Struct_Microchip - Fatal编程技术网

C 特殊结构类型

C 特殊结构类型,c,struct,microchip,C,Struct,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; }

因此,我在查看微芯片的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;
我似乎无法理解这里的类型或实例是什么,以及这样设计的目的是什么:

什么是塔格亚特? 什么是UART? 什么是普亚特? 这是一种集所有功能于一体的

这是一种集所有功能于一体的

什么是塔格亚特

它是结构的名称

什么是UART

它是结构的typedef/别名

什么是普亚特

它是指向结构的指针的typedef/别名

什么是塔格亚特

它是结构的名称

什么是UART

它是结构的typedef/别名

什么是普亚特


它是指向结构的指针的typedef/别名。

/questions/252780/why-should-we-typedef-a-struct-so-frequency-in-c-第一次点击搜索[c]typedef结构。/questions/252780/why-should-we-typedef-a-struct-so-frequency-in-c-第一次点击搜索[c]typedef结构。
struct tagUART { // the structure itself with all its details
        uint16_t uxmode;
        uint16_t uxsta;
        uint16_t uxtxreg;
        uint16_t uxrxreg;
        uint16_t uxbrg;
};

typedef struct tagUART UART; // UART is a shorter name for struct tagUART
typedef struct tagUART *PUART; // PUART is a pointer-type to such a struct