@@ -19,12 +19,45 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
19
19
- Readd MonoTimer. This was accidentally removed before. ([ #247 ] )
20
20
- Basic serial implementation also available for UART4 and UART5 ([ #246 ] )
21
21
- Implement serial DMA also for Serial ([ #246 ] )
22
+ - Add [ ` enumset ` ] [ ] as a optional dependency, which allow more ergonomic functions
23
+ regarding enums. This is especially useful for status event query functions.
24
+ ([ #253 ] )
25
+ - As serial ` Error ` and serial ` Events ` share things in common. ` TryFrom<Event> `
26
+ and ` From<Error> ` is implemented for conversions. ([ #253 ] )
27
+ - Add serial character match function, with which events can be triggered for
28
+ the set character. ([ #253 ] )
29
+ - Add receiver timeout function, which configures the serial peripheral to
30
+ trigger an event, if nothing happened after a certain time on the serial
31
+ receiver line. ([ #253 ] )
32
+ - Add ` raw_read() ` function, which does no error handling and also does not
33
+ clear any ` Event ` by itself. Useful, if the error_handling has to be done in
34
+ another context (like an interrupt rountine). ([ #253 ] )
35
+ - Introduce ` Toggle ` , with ` On ` and ` Off ` as a convinience wrapper around ` bool `
36
+ for configuration purposes. ([ #253 ] )
37
+ - Add an associated const to ` serial::Instance ` to return the corresponding
38
+ ` pac::Interrupt ` -number, which is useful to ` unmask() ` interrupts.
39
+ An ` nvic() ` function to ` Serial ` was also added for convinience. ([ #253 ] )
40
+ - Add a ` Serial::is_busy() ` function to check, if the serial device is busy.
41
+ Useful to block on this function, e.g. ` while serial.is_busy() {} ` . ([ #253 ] )
42
+ - Add ` BaudTable ` a convinience wrapper around ` Baud ` to configure the ` Serial `
43
+ to the most commen baud rates. ([ #253 ] )
44
+ - Add ` Serial::detect_overrun() ` function, to en- or disable the overrun
45
+ detection of the ` Serial ` . If overrun is disabled (enabled by default), than
46
+ newly arrived bytes are overwriting the current data in the read receive
47
+ register without throwing any event. ([ #253 ] ).
48
+ - Lift generic constraint of most ` Serial ` method on ` TxPin ` and ` RxPin ` .
49
+ This should make it easier to generically use the ` Serial ` peripheral. ([ #253 ] )
50
+
51
+ [ `enumset` ] : https://crates.io/crates/enumset
22
52
23
53
### Changed
24
54
25
55
- ` PXx ` struct (representing a generic GPIO pin) implements ` Send ` and ` Sync ` ([ #251 ] )
26
56
- Each pin aliases (` PA0 ` , ` PA1 ` , ..) are defined under ` gpio ` module directly.
27
- Re-export from gpio port sub-modules are provided for compatibility. [ #257 ]
57
+ Re-export from gpio port sub-modules are provided for compatibility. ([ #257 ] )
58
+ - The ` embedded-hal ` Read implementation of ` Serial ` does now return ` WoudBlock `
59
+ if the peripheral is busy. Also if an ` Overrun ` occured the receive data
60
+ register (RDR) is flushed to have a more consistent API. ([ #253 ] )
28
61
29
62
### Fixed
30
63
@@ -45,6 +78,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
45
78
when ` Serial::split ` was previously called. ([ #252 ] )
46
79
- Parameterized ` usb::Peripheral ` and ` usb::UsbType ` on the pin configuration
47
80
used ([ #255 ] )
81
+ - Add (almost) all missing serial (interrupt and status) events.
82
+ Also rename all the event names to be more descriptive. ([ #253 ] )
83
+ - A new serial interrupt API was introduced: ([ #253 ] )
84
+ - ` listen() ` and ` unlisten() ` are renamed to ` enable_interrupt() ` and
85
+ ` disable_interrupt() ` .
86
+ - ` is_tc() ` and other non-parametrizable functions are removed.
87
+ - ` configure_interrupt() ` was added, which can be parameterized.
88
+ - ` clear_event() ` was added to clear specific events.
89
+ - ` clear_events() ` was added to clear all events at once.
90
+ - ` is_event_triggered() ` can check if an ` Event ` is triggered.
91
+ - ` triggered_events ` returns an ` EnumSet ` of triggered events.
48
92
49
93
## [ v0.7.0] - 2021-06-18
50
94
@@ -374,6 +418,7 @@ let clocks = rcc
374
418
[ #259 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/259
375
419
[ #257 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/257
376
420
[ #255 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/255
421
+ [ #253 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/253
377
422
[ #252 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/252
378
423
[ #251 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/251
379
424
[ #247 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/247
0 commit comments