@@ -345,6 +345,9 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::uart5Parameters {UART5_BASE
345
345
#if defined(RCC_APB1ENR_LPUART1EN)
346
346
const ChipUartLowLevel::Parameters ChipUartLowLevel::lpuart1Parameters {LPUART1_BASE, offsetof (RCC_TypeDef, APB1ENR),
347
347
RCC_APB1ENR_LPUART1EN, offsetof (RCC_TypeDef, APB1RSTR), RCC_APB1RSTR_LPUART1RST};
348
+ #elif defined(RCC_APB3ENR_LPUART1EN)
349
+ const ChipUartLowLevel::Parameters ChipUartLowLevel::lpuart1Parameters {LPUART1_BASE, offsetof (RCC_TypeDef, APB3ENR),
350
+ RCC_APB3ENR_LPUART1EN, offsetof (RCC_TypeDef, APB3RSTR), RCC_APB3RSTR_LPUART1RST};
348
351
#elif defined(RCC_APBENR1_LPUART1EN)
349
352
const ChipUartLowLevel::Parameters ChipUartLowLevel::lpuart1Parameters {LPUART1_BASE, offsetof (RCC_TypeDef, APBENR1),
350
353
RCC_APBENR1_LPUART1EN, offsetof (RCC_TypeDef, APBRSTR1), RCC_APBRSTR1_LPUART1RST};
@@ -374,6 +377,9 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart1Parameters {USART1_BA
374
377
#if defined(RCC_APB1ENR_USART2EN)
375
378
const ChipUartLowLevel::Parameters ChipUartLowLevel::usart2Parameters {USART2_BASE, offsetof (RCC_TypeDef, APB1ENR),
376
379
RCC_APB1ENR_USART2EN, offsetof (RCC_TypeDef, APB1RSTR), RCC_APB1RSTR_USART2RST};
380
+ #elif defined(RCC_APB1ENR1_USART2EN)
381
+ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart2Parameters {USART2_BASE, offsetof (RCC_TypeDef, APB1ENR1),
382
+ RCC_APB1ENR1_USART2EN, offsetof (RCC_TypeDef, APB1RSTR1), RCC_APB1RSTR1_USART2RST};
377
383
#elif defined(RCC_APBENR1_USART2EN)
378
384
const ChipUartLowLevel::Parameters ChipUartLowLevel::usart2Parameters {USART2_BASE, offsetof (RCC_TypeDef, APBENR1),
379
385
RCC_APBENR1_USART2EN, offsetof (RCC_TypeDef, APBRSTR1), RCC_APBRSTR1_USART2RST};
@@ -386,6 +392,9 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart2Parameters {USART2_BA
386
392
#if defined(RCC_APB1ENR_USART3EN)
387
393
const ChipUartLowLevel::Parameters ChipUartLowLevel::usart3Parameters {USART3_BASE, offsetof (RCC_TypeDef, APB1ENR),
388
394
RCC_APB1ENR_USART3EN, offsetof (RCC_TypeDef, APB1RSTR), RCC_APB1RSTR_USART3RST};
395
+ #elif defined(RCC_APB1ENR1_USART3EN)
396
+ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart3Parameters {USART3_BASE, offsetof (RCC_TypeDef, APB1ENR1),
397
+ RCC_APB1ENR1_USART3EN, offsetof (RCC_TypeDef, APB1RSTR1), RCC_APB1RSTR1_USART3RST};
389
398
#elif defined(RCC_APBENR1_USART3EN)
390
399
const ChipUartLowLevel::Parameters ChipUartLowLevel::usart3Parameters {USART3_BASE, offsetof (RCC_TypeDef, APBENR1),
391
400
RCC_APBENR1_USART3EN, offsetof (RCC_TypeDef, APBRSTR1), RCC_APBRSTR1_USART3RST};
@@ -395,8 +404,15 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart3Parameters {USART3_BA
395
404
#endif // def DISTORTOS_CHIP_USART3_ENABLE
396
405
397
406
#ifdef DISTORTOS_CHIP_UART4_ENABLE
407
+ #if defined(RCC_APB1ENR_UART4EN)
398
408
const ChipUartLowLevel::Parameters ChipUartLowLevel::uart4Parameters {UART4_BASE, offsetof (RCC_TypeDef, APB1ENR),
399
409
RCC_APB1ENR_UART4EN, offsetof (RCC_TypeDef, APB1RSTR), RCC_APB1RSTR_UART4RST};
410
+ #elif defined(RCC_APB1ENR1_UART4EN)
411
+ const ChipUartLowLevel::Parameters ChipUartLowLevel::uart4Parameters {UART4_BASE, offsetof (RCC_TypeDef, APB1ENR1),
412
+ RCC_APB1ENR1_UART4EN, offsetof (RCC_TypeDef, APB1RSTR1), RCC_APB1RSTR1_UART4RST};
413
+ #else
414
+ #error "Unsupported UART4 variant!"
415
+ #endif
400
416
#endif // def DISTORTOS_CHIP_UART4_ENABLE
401
417
402
418
#ifdef DISTORTOS_CHIP_USART4_ENABLE
@@ -412,8 +428,15 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::usart4Parameters {USART4_BA
412
428
#endif // def DISTORTOS_CHIP_USART4_ENABLE
413
429
414
430
#ifdef DISTORTOS_CHIP_UART5_ENABLE
431
+ #if defined(RCC_APB1ENR_UART5EN)
415
432
const ChipUartLowLevel::Parameters ChipUartLowLevel::uart5Parameters {UART5_BASE, offsetof (RCC_TypeDef, APB1ENR),
416
433
RCC_APB1ENR_UART5EN, offsetof (RCC_TypeDef, APB1RSTR), RCC_APB1RSTR_UART5RST};
434
+ #elif defined(RCC_APB1ENR1_UART5EN)
435
+ const ChipUartLowLevel::Parameters ChipUartLowLevel::uart5Parameters {UART5_BASE, offsetof (RCC_TypeDef, APB1ENR1),
436
+ RCC_APB1ENR1_UART5EN, offsetof (RCC_TypeDef, APB1RSTR1), RCC_APB1RSTR1_UART5RST};
437
+ #else
438
+ #error "Unsupported UART5 variant!"
439
+ #endif
417
440
#endif // def DISTORTOS_CHIP_UART5_ENABLE
418
441
419
442
#ifdef DISTORTOS_CHIP_USART5_ENABLE
0 commit comments