在线时间40 小时
UID132062
注册时间2007-7-16
NXP金币4
该用户从未签到
注册会员

- 积分
- 177
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-10-29 16:37:36
|
显示全部楼层
安 发表于 2014-10-29 16:20
UART0_PDD_SetBaudRate(UART0_BASE_PTR, 2500U); /* Set the baud rate register. */
我说的是UART0_PDD_ ...
/* ----------------------------------------------------------------------------
-- SetBaudRate
---------------------------------------------------------------------------- */
/**
* @brief Sets new baud rate value.
* @param PeripheralBase Pointer to a peripheral registers structure (peripheral
* base address). You can use the constant defined in the registers
* definition header file (<peripheral>_BASE_PTR) or the constant defined in
* the peripheral initialization component header file
* (<component_name>_DEVICE).
* @param BaudRate New baud rate value. This parameter is a 13-bit value.
* @return Returns a value of void type.
* @remarks The macro accesses the following registers: UART0_BDH, UART0_BDL
* (depending on the peripheral).
* @par Example:
* @code
* UART0_PDD_SetBaudRate(<peripheral>_BASE_PTR, 1);
* @endcode
*/
#define UART0_PDD_SetBaudRate(PeripheralBase, BaudRate) ( \
(UART0_BDH_REG(PeripheralBase) = \
(uint8_t)(( \
(uint8_t)(UART0_BDH_REG(PeripheralBase) & (uint8_t)(~(uint8_t)UART0_BDH_SBR_MASK))) | ( \
(uint8_t)((uint16_t)(BaudRate) >> 8U)))), \
(UART0_BDL_REG(PeripheralBase) = \
(uint8_t)(BaudRate)) \
)
这是在UART0_PDD.h文件中的,你看是不是。 |
|