Skip to content

Commit 75af749

Browse files
authored
Merge pull request #2571 from svastm/serial_asynch_f7
STM32F7 - Add asynchronous serial
2 parents 1a91c1c + 15e60fc commit 75af749

File tree

8 files changed

+673
-170
lines changed

8 files changed

+673
-170
lines changed

hal/targets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@
887887
},
888888
"supported_form_factors": ["ARDUINO"],
889889
"detect_code": ["0816"],
890-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
890+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
891891
"features": ["IPV4"],
892892
"release_versions": ["2", "5"]
893893
},
@@ -900,7 +900,7 @@
900900
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],
901901
"progen": {"target": "nucleo-f767zi"},
902902
"detect_code": ["0818"],
903-
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
903+
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
904904
"features": ["IPV4"],
905905
"release_versions": ["2", "5"]
906906
},
@@ -1107,7 +1107,7 @@
11071107
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],
11081108
"progen": {"target": "disco-f746ng"},
11091109
"detect_code": ["0815"],
1110-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
1110+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
11111111
"features": ["IPV4"],
11121112
"release_versions": ["2", "5"]
11131113
},
@@ -1119,7 +1119,7 @@
11191119
"default_toolchain": "ARM",
11201120
"progen": {"target": "disco-f769ni"},
11211121
"detect_code": ["0817"],
1122-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
1122+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
11231123
"features": ["IPV4"],
11241124
"release_versions": ["2"]
11251125
},

hal/targets/hal/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F746NG/objects.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct serial_s {
70-
UARTName uart;
71-
int index; // Used by irq
72-
uint32_t baudrate;
73-
uint32_t databits;
74-
uint32_t stopbits;
75-
uint32_t parity;
76-
PinName pin_tx;
77-
PinName pin_rx;
78-
};
79-
8069
struct spi_s {
8170
SPIName spi;
8271
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/objects.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct serial_s {
70-
UARTName uart;
71-
int index; // Used by irq
72-
uint32_t baudrate;
73-
uint32_t databits;
74-
uint32_t stopbits;
75-
uint32_t parity;
76-
PinName pin_tx;
77-
PinName pin_rx;
78-
#if DEVICE_SERIAL_FC
79-
uint32_t hw_flow_ctl;
80-
PinName pin_rts;
81-
PinName pin_cts;
82-
#endif
83-
};
84-
8569
struct spi_s {
8670
SPIName spi;
8771
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F746ZG/objects.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct serial_s {
70-
UARTName uart;
71-
int index; // Used by irq
72-
uint32_t baudrate;
73-
uint32_t databits;
74-
uint32_t stopbits;
75-
uint32_t parity;
76-
PinName pin_tx;
77-
PinName pin_rx;
78-
#if DEVICE_SERIAL_FC
79-
uint32_t hw_flow_ctl;
80-
PinName pin_rts;
81-
PinName pin_cts;
82-
#endif
83-
};
84-
8569
struct spi_s {
8670
SPIName spi;
8771
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F767ZI/objects.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct serial_s {
70-
UARTName uart;
71-
int index; // Used by irq
72-
uint32_t baudrate;
73-
uint32_t databits;
74-
uint32_t stopbits;
75-
uint32_t parity;
76-
PinName pin_tx;
77-
PinName pin_rx;
78-
#if DEVICE_SERIAL_FC
79-
uint32_t hw_flow_ctl;
80-
PinName pin_rts;
81-
PinName pin_cts;
82-
#endif
83-
};
84-
8569
struct spi_s {
8670
SPIName spi;
8771
uint32_t bits;

hal/targets/hal/TARGET_STM/TARGET_STM32F7/common_objects.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,25 @@ struct pwmout_s {
4949
uint8_t inverted;
5050
};
5151

52+
struct serial_s {
53+
UARTName uart;
54+
int index; // Used by irq
55+
uint32_t baudrate;
56+
uint32_t databits;
57+
uint32_t stopbits;
58+
uint32_t parity;
59+
PinName pin_tx;
60+
PinName pin_rx;
61+
#if DEVICE_SERIAL_ASYNCH
62+
uint32_t events;
63+
#endif
64+
#if DEVICE_SERIAL_FC
65+
uint32_t hw_flow_ctl;
66+
PinName pin_rts;
67+
PinName pin_cts;
68+
#endif
69+
};
70+
5271
#include "gpio_object.h"
5372

5473
#ifdef __cplusplus

0 commit comments

Comments
 (0)