@@ -38,7 +38,6 @@ pub struct RegisterBlock {
38
38
39
39
_reserved5 : [ u32 ; 48 ] ,
40
40
41
- #[ cfg( not( armv6m) ) ]
42
41
/// Interrupt Priority
43
42
///
44
43
/// On ARMv7-M, 124 word-sized registers are available. Each of those
@@ -50,9 +49,9 @@ pub struct RegisterBlock {
50
49
/// On ARMv6-M, the registers must only be accessed along word boundaries,
51
50
/// so convenient byte-sized representation wouldn't work on that
52
51
/// architecture.
52
+ #[ cfg( not( armv6m) ) ]
53
53
pub ipr : [ RW < u8 > ; 496 ] ,
54
54
55
- #[ cfg( armv6m) ]
56
55
/// Interrupt Priority
57
56
///
58
57
/// On ARMv7-M, 124 word-sized registers are available. Each of those
@@ -64,25 +63,26 @@ pub struct RegisterBlock {
64
63
/// On ARMv6-M, the registers must only be accessed along word boundaries,
65
64
/// so convenient byte-sized representation wouldn't work on that
66
65
/// architecture.
66
+ #[ cfg( armv6m) ]
67
67
pub ipr : [ RW < u32 > ; 8 ] ,
68
68
69
69
#[ cfg( not( armv6m) ) ]
70
70
_reserved6 : [ u32 ; 580 ] ,
71
71
72
- #[ cfg( not( armv6m) ) ]
73
72
/// Software Trigger Interrupt
73
+ #[ cfg( not( armv6m) ) ]
74
74
pub stir : WO < u32 > ,
75
75
}
76
76
77
77
impl NVIC {
78
- #[ cfg( not( armv6m) ) ]
79
78
/// Request an IRQ in software
80
79
///
81
80
/// Writing a value to the INTID field is the same as manually pending an interrupt by setting
82
81
/// the corresponding interrupt bit in an Interrupt Set Pending Register. This is similar to
83
82
/// `set_pending`.
84
83
///
85
84
/// This method is not available on ARMv6-M chips.
85
+ #[ cfg( not( armv6m) ) ]
86
86
#[ inline]
87
87
pub fn request < I > ( & mut self , interrupt : I )
88
88
where
@@ -95,16 +95,6 @@ impl NVIC {
95
95
}
96
96
}
97
97
98
- /// Clears `interrupt`'s pending state
99
- #[ deprecated( since = "0.5.8" , note = "Use `NVIC::unpend`" ) ]
100
- #[ inline]
101
- pub fn clear_pending < I > ( & mut self , interrupt : I )
102
- where
103
- I : Nr ,
104
- {
105
- Self :: unpend ( interrupt)
106
- }
107
-
108
98
/// Disables `interrupt`
109
99
#[ inline]
110
100
pub fn mask < I > ( interrupt : I )
@@ -129,27 +119,6 @@ impl NVIC {
129
119
( * Self :: ptr ( ) ) . iser [ usize:: from ( nr / 32 ) ] . write ( 1 << ( nr % 32 ) )
130
120
}
131
121
132
- /// Disables `interrupt`
133
- #[ deprecated( since = "0.6.1" , note = "Use `NVIC::mask`" ) ]
134
- #[ inline]
135
- pub fn disable < I > ( & mut self , interrupt : I )
136
- where
137
- I : Nr ,
138
- {
139
- Self :: mask ( interrupt)
140
- }
141
-
142
- /// **WARNING** This method is a soundness hole in the API; it should actually be an `unsafe`
143
- /// function. Use `NVIC::unmask` which has the right unsafety.
144
- #[ deprecated( since = "0.6.1" , note = "Use `NVIC::unmask`" ) ]
145
- #[ inline]
146
- pub fn enable < I > ( & mut self , interrupt : I )
147
- where
148
- I : Nr ,
149
- {
150
- unsafe { Self :: unmask ( interrupt) }
151
- }
152
-
153
122
/// Returns the NVIC priority of `interrupt`
154
123
///
155
124
/// *NOTE* NVIC encodes priority in the highest bits of a byte so values like `1` and `2` map
@@ -228,16 +197,6 @@ impl NVIC {
228
197
unsafe { ( * Self :: ptr ( ) ) . ispr [ usize:: from ( nr / 32 ) ] . write ( 1 << ( nr % 32 ) ) }
229
198
}
230
199
231
- /// Forces `interrupt` into pending state
232
- #[ deprecated( since = "0.5.8" , note = "Use `NVIC::pend`" ) ]
233
- #[ inline]
234
- pub fn set_pending < I > ( & mut self , interrupt : I )
235
- where
236
- I : Nr ,
237
- {
238
- Self :: pend ( interrupt)
239
- }
240
-
241
200
/// Sets the "priority" of `interrupt` to `prio`
242
201
///
243
202
/// *NOTE* See [`get_priority`](struct.NVIC.html#method.get_priority) method for an explanation
0 commit comments