Skip to content

Commit 1a3d94a

Browse files
committed
[STM32L1] Add asynchronous serial
1 parent 22acfbf commit 1a3d94a

File tree

5 files changed

+649
-155
lines changed

5 files changed

+649
-155
lines changed

hal/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/objects.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,6 @@ struct dac_s {
6464
PinName pin;
6565
};
6666

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

hal/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/objects.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,6 @@ struct dac_s {
6464
PinName pin;
6565
};
6666

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

hal/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_NZ32_SC151/objects.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,6 @@ struct dac_s {
6464
PinName pin;
6565
};
6666

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

hal/targets/hal/TARGET_STM/TARGET_STM32L1/common_objects.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,25 @@ struct pwmout_s {
4747
uint32_t pulse;
4848
};
4949

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

5271
#ifdef __cplusplus

0 commit comments

Comments
 (0)