mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2465 from svastm/serial_asynch_l4
[STM32L4] Add asynchronous serialpull/2527/head
commit
21d55cd235
|
|
@ -964,7 +964,7 @@
|
|||
"inherits": ["Target"],
|
||||
"progen": {"target": "nucleo-l476rg"},
|
||||
"detect_code": ["0765"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
|
||||
"release_versions": ["2", "5"]
|
||||
},
|
||||
"STM32F3XX": {
|
||||
|
|
|
|||
|
|
@ -66,17 +66,6 @@ struct dac_s {
|
|||
uint32_t channel;
|
||||
};
|
||||
|
||||
struct serial_s {
|
||||
UARTName uart;
|
||||
int index; // Used by irq
|
||||
uint32_t baudrate;
|
||||
uint32_t databits;
|
||||
uint32_t stopbits;
|
||||
uint32_t parity;
|
||||
PinName pin_tx;
|
||||
PinName pin_rx;
|
||||
};
|
||||
|
||||
struct spi_s {
|
||||
SPIName spi;
|
||||
uint32_t bits;
|
||||
|
|
|
|||
|
|
@ -66,22 +66,6 @@ struct dac_s {
|
|||
uint32_t channel;
|
||||
};
|
||||
|
||||
struct serial_s {
|
||||
UARTName uart;
|
||||
int index; // Used by irq
|
||||
uint32_t baudrate;
|
||||
uint32_t databits;
|
||||
uint32_t stopbits;
|
||||
uint32_t parity;
|
||||
PinName pin_tx;
|
||||
PinName pin_rx;
|
||||
#if DEVICE_SERIAL_FC
|
||||
uint32_t hw_flow_ctl;
|
||||
PinName pin_rts;
|
||||
PinName pin_cts;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct spi_s {
|
||||
SPIName spi;
|
||||
uint32_t bits;
|
||||
|
|
|
|||
|
|
@ -66,22 +66,6 @@ struct dac_s {
|
|||
uint32_t channel;
|
||||
};
|
||||
|
||||
struct serial_s {
|
||||
UARTName uart;
|
||||
int index; // Used by irq
|
||||
uint32_t baudrate;
|
||||
uint32_t databits;
|
||||
uint32_t stopbits;
|
||||
uint32_t parity;
|
||||
PinName pin_tx;
|
||||
PinName pin_rx;
|
||||
#if DEVICE_SERIAL_FC
|
||||
uint32_t hw_flow_ctl;
|
||||
PinName pin_rts;
|
||||
PinName pin_cts;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct spi_s {
|
||||
SPIName spi;
|
||||
uint32_t bits;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,25 @@ struct pwmout_s {
|
|||
uint8_t inverted;
|
||||
};
|
||||
|
||||
struct serial_s {
|
||||
UARTName uart;
|
||||
int index; // Used by irq
|
||||
uint32_t baudrate;
|
||||
uint32_t databits;
|
||||
uint32_t stopbits;
|
||||
uint32_t parity;
|
||||
PinName pin_tx;
|
||||
PinName pin_rx;
|
||||
#if DEVICE_SERIAL_ASYNCH
|
||||
uint32_t events;
|
||||
#endif
|
||||
#if DEVICE_SERIAL_FC
|
||||
uint32_t hw_flow_ctl;
|
||||
PinName pin_rts;
|
||||
PinName pin_cts;
|
||||
#endif
|
||||
};
|
||||
|
||||
#include "gpio_object.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -75,6 +75,9 @@
|
|||
#define TEST_SERIAL_ONE_TX_PIN PB_6 // UART1
|
||||
#define TEST_SERIAL_TWO_RX_PIN PG_9 // UART6
|
||||
|
||||
#elif defined(TARGET_NUCLEO_L476RG)
|
||||
#define TEST_SERIAL_ONE_TX_PIN PB_10 // UART3
|
||||
#define TEST_SERIAL_TWO_RX_PIN PA_10 // UART1
|
||||
#elif defined(TARGET_RZ_A1H)
|
||||
#define TEST_SERIAL_ONE_TX_PIN P8_14 // UART4
|
||||
#define TEST_SERIAL_TWO_RX_PIN P8_11 // UART5
|
||||
|
|
|
|||
Loading…
Reference in New Issue