2.2 初始化和配置结构
这些结构在通用驱动头文件中定义,当它对所有部分都是通用的数字。 当它们可以从一个零件号码转换到另一个时,结构是在每个零件号的扩展头文件中定义。
- typedef struct
- {
- uint32_t BaudRate; /*!< This member configures the UART communication baudrate.*/
- uint32_t WordLength; /*!< Specifies the number of data bits transmitted
- or received in a frame.*/
- uint32_t StopBits; /*!< Specifies the number of stop bits transmitted.*/
- uint32_t Parity; /*!< Specifies the parity mode. */
- uint32_t Mode; /*!< Specifies wether the Receive or Transmit mode is
- enabled or disabled.*/
- uint32_t HwFlowCtl; /*!< Specifies wether the hardware flow control mode
- is enabled or disabled.*/
- uint32_t OverSampling; /*!< Specifies wether the Over sampling 8 is
- enabled or disabled,to achieve higher speed (up to fPCLK/8).*/
- }UART_InitTypeDef;
|