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/).
4646- Add an option to allow overclocking [ #494 ]
4747- ` new ` on gpio mode [ #506 ]
4848- Add ` Serial ` ` rx ` /` tx ` constructors [ #509 ]
49+ - Add enable/disable EOC interrupt functions for ADCs [ #526 ]
4950
5051[ #416 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/416
5152[ #453 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/453
@@ -69,6 +70,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6970[ #514 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/514
7071[ #516 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/516
7172[ #520 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/520
73+ [ #526 ] : https://github.com/stm32-rs/stm32f1xx-hal/pull/526
7274
7375## [ v0.10.0] - 2022-12-12
7476
Original file line number Diff line number Diff line change @@ -418,6 +418,26 @@ macro_rules! adc_hal {
418418 self . disable_clock( ) ;
419419 self . rb
420420 }
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+ }
421441 }
422442
423443 impl ChannelTimeSequence for Adc <$ADC> {
You can’t perform that action at this time.
0 commit comments