Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STM32F1] Add asynchronous serial #2419

Merged
merged 3 commits into from
Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hal/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@
"inherits": ["Target"],
"progen": {"target": "nucleo-f103rb"},
"detect_code": ["0700"],
"device_has": ["ANALOGIN", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"device_has": ["ANALOGIN", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"release_versions": ["2", "5"]
},
"NUCLEO_F207ZG": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ struct analogin_s {
uint8_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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ struct analogin_s {
uint8_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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ struct analogin_s {
uint8_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;
Expand Down
19 changes: 19 additions & 0 deletions hal/targets/hal/TARGET_STM/TARGET_STM32F1/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading