@@ -219,20 +219,18 @@ impl Rtc {
219
219
// HAL_RTC_SetAlarm_IT[L1921-L2098]
220
220
self . write ( false , |rtc| match alarm {
221
221
Alarm :: AlarmA => {
222
- let interrupt_enabled = rtc. cr . read ( ) . alraie ( ) . bit ( ) ; // cache interrupt state
223
- rtc. cr
224
- . modify ( |_, w| w. alrae ( ) . clear_bit ( ) . alraie ( ) . clear_bit ( ) ) ; // Disable the Alarm A interrupt
222
+ rtc. cr . modify ( |_, w| w. alrae ( ) . clear_bit ( ) ) ; // Disable the Alarm A interrupt
225
223
#[ cfg( any(
226
224
feature = "private_product_L41_L42" ,
227
- feature = "private_product_L4P_L4Q"
225
+ // feature = "private_product_L4P_L4Q"
228
226
) ) ]
229
227
{
230
228
rtc. scr . write ( |w| w. calraf ( ) . set_bit ( ) ) ;
231
229
// no waiting
232
230
}
233
231
#[ cfg( not( any(
234
232
feature = "private_product_L41_L42" ,
235
- feature = "private_product_L4P_L4Q"
233
+ // feature = "private_product_L4P_L4Q"
236
234
) ) ) ]
237
235
{
238
236
rtc. isr . modify ( |_, w| w. alraf ( ) . clear_bit ( ) ) ;
@@ -268,25 +266,22 @@ impl Rtc {
268
266
// write the SS value and mask to `rtc.alrmassr`
269
267
270
268
// enable alarm and reenable interrupt if it was enabled
271
- rtc. cr
272
- . modify ( |_, w| w. alrae ( ) . set_bit ( ) . alraie ( ) . bit ( interrupt_enabled) ) ;
269
+ rtc. cr . modify ( |_, w| w. alrae ( ) . set_bit ( ) ) ;
273
270
}
274
271
Alarm :: AlarmB => {
275
- let interrupt_enabled = rtc. cr . read ( ) . alrbie ( ) . bit ( ) ; // cache interrupt state
276
- rtc. cr
277
- . modify ( |_, w| w. alrbe ( ) . clear_bit ( ) . alraie ( ) . clear_bit ( ) ) ;
272
+ rtc. cr . modify ( |_, w| w. alrbe ( ) . clear_bit ( ) ) ;
278
273
279
274
#[ cfg( any(
280
275
feature = "private_product_L41_L42" ,
281
- feature = "private_product_L4P_L4Q"
276
+ // feature = "private_product_L4P_L4Q"
282
277
) ) ]
283
278
{
284
279
rtc. scr . write ( |w| w. calrbf ( ) . set_bit ( ) ) ;
285
280
// no waiting
286
281
}
287
282
#[ cfg( not( any(
288
283
feature = "private_product_L41_L42" ,
289
- feature = "private_product_L4P_L4Q"
284
+ // feature = "private_product_L4P_L4Q"
290
285
) ) ) ]
291
286
{
292
287
rtc. isr . modify ( |_, w| w. alrbf ( ) . clear_bit ( ) ) ;
@@ -322,8 +317,7 @@ impl Rtc {
322
317
// write the SS value and mask to `rtc.alrmassr`
323
318
324
319
// enable alarm and reenable interrupt if it was enabled
325
- rtc. cr
326
- . modify ( |_, w| w. alrbe ( ) . set_bit ( ) . alrbie ( ) . bit ( interrupt_enabled) ) ;
320
+ rtc. cr . modify ( |_, w| w. alrbe ( ) . set_bit ( ) ) ;
327
321
}
328
322
} ) ;
329
323
}
0 commit comments