stm32: Portability changes.
This commit is contained in:
parent
b9249fe104
commit
76f9a6ad42
|
@ -21,7 +21,10 @@
|
|||
#include "general.h"
|
||||
#include "target.h"
|
||||
|
||||
#if !defined(STM32F1) && !defined(STM32F4)
|
||||
#if !defined(STM32F0) && !defined(STM32F1) && !defined(STM32F2) && \
|
||||
!defined(STM32F3) && !defined(STM32F4) && !defined(STM32F7) && \
|
||||
!defined(STM32L0) && !defined(STM32L1) && !defined(STM32F4) && \
|
||||
!defined(STM32G0) && !defined(STM32G4)
|
||||
static const uint32_t crc32_table[] = {
|
||||
0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9,
|
||||
0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005,
|
||||
|
|
|
@ -22,13 +22,8 @@
|
|||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
|
||||
#ifndef STM32F4
|
||||
# include <libopencm3/stm32/f1/memorymap.h>
|
||||
# include <libopencm3/stm32/f1/gpio.h>
|
||||
#else
|
||||
# include <libopencm3/stm32/f4/memorymap.h>
|
||||
# include <libopencm3/stm32/f4/gpio.h>
|
||||
#endif
|
||||
#include <libopencm3/stm32/memorymap.h>
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
|
||||
#define INLINE_GPIO
|
||||
|
||||
|
|
|
@ -216,7 +216,10 @@ void USBUSART_ISR(void)
|
|||
{
|
||||
uint32_t err = USART_SR(USBUSART);
|
||||
char c = usart_recv(USBUSART);
|
||||
if (err & (USART_SR_ORE | USART_SR_FE | USART_SR_NE))
|
||||
#if !defined(USART_SR_NE) && defined(USART_ISR_NF)
|
||||
# define USART_SR_NE USART_ISR_NF
|
||||
#endif
|
||||
if (err & (USART_FLAG_ORE | USART_FLAG_FE | USART_SR_NE))
|
||||
return;
|
||||
|
||||
/* Turn on LED */
|
||||
|
|
Loading…
Reference in New Issue