| поискавой системы для электроныых деталей |
|
AN2776 датащи(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2776 датащи(HTML) 14 Page - STMicroelectronics |
|
14 / 20 page ![]() FWLib V1.0 to V2.0 migration steps AN2776 14/20 } USART_InitTypeDef; In FWLib V2.0, this driver was updated to support the new UART4 and UART5 peripherals present in High-density devices. UART4 and UART5 do not support synchronous operations like Smartcard mode and SPI-like communication. USART_Init was split up into two functions: USART_Init It is used for basic and asynchronous parameter configuration of USART1, USART2, USART3, UART4 and UART5: USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) The USART_InitTypeDef structure definition is modified as follows: typedef struct { u32 USART_BaudRate; u16 USART_WordLength; u16 USART_StopBits; u16 USART_Parity; u16 USART_Mode; u16 USART_HardwareFlowControl; } USART_InitTypeDef; As a result, in code based on FWLib V1.0, if the application does not use the synchronous parameters, update the code as given in the following example: USART configuration based on FWLib V1.0: USART_InitStructure.USART_BaudRate = 115200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No ; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_InitStructure.USART_Clock = USART_Clock_Disable; USART_InitStructure.USART_CPOL = USART_CPOL_Low; USART_InitStructure.USART_CPHA = USART_CPHA_2Edge; USART_InitStructure.USART_LastBit = USART_LastBit_Disable; /* Configure USART1 */ USART_Init(USART1, &USART_InitStructure); In FWLib V2.0, the USART_Clock, USART_CPOL, USART_CPHA and USART_LastBit structure members were removed: USART_InitStructure.USART_BaudRate = 115200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No ; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; /* Configure USART1 basic and asynchronous paramters */ USART_Init(USART1, &USART_InitStructure); |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |