File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
46
46
- Add an option to allow overclocking [ #494 ]
47
47
- ` new ` on gpio mode [ #506 ]
48
48
- Add ` Serial ` ` rx ` /` tx ` constructors [ #509 ]
49
+ - Add enable/disable EOC interrupt functions for ADCs [ #526 ]
49
50
50
51
[ #416 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/416
51
52
[ #453 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/453
@@ -69,6 +70,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
69
70
[ #514 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/514
70
71
[ #516 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/516
71
72
[ #520 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/520
73
+ [ #526 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/526
72
74
73
75
## [ v0.10.0] - 2022-12-12
74
76
Original file line number Diff line number Diff line change @@ -418,6 +418,26 @@ macro_rules! adc_hal {
418
418
self . disable_clock( ) ;
419
419
self . rb
420
420
}
421
+
422
+ /// Enable interrupt for EOC (end of convert)
423
+ pub fn enable_eoc_interrupt( & mut self ) {
424
+ self . rb. cr1( ) . write( |w| w. eocie( ) . set_bit( ) ) ;
425
+ }
426
+
427
+ /// Disable interrupt for EOC (end of convert)
428
+ pub fn disable_eoc_interrupt( & mut self ) {
429
+ self . rb. cr1( ) . write( |w| w. eocie( ) . clear_bit( ) ) ;
430
+ }
431
+
432
+ /// Enable interrupt for JEOC (EOC for injected channels)
433
+ pub fn enable_jeoc_interrupt( & mut self ) {
434
+ self . rb. cr1( ) . write( |w| w. jeocie( ) . set_bit( ) ) ;
435
+ }
436
+
437
+ /// Disable interrupt for JEOC (EOC for injected channels)
438
+ pub fn disable_jeoc_interrupt( & mut self ) {
439
+ self . rb. cr1( ) . write( |w| w. jeocie( ) . clear_bit( ) ) ;
440
+ }
421
441
}
422
442
423
443
impl ChannelTimeSequence for Adc <$ADC> {
You can’t perform that action at this time.
0 commit comments