File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,15 @@ void HardwareTimer::detachInterrupt(int channel) {
138
138
timer_detach_interrupt (this ->dev , (uint8)channel);
139
139
}
140
140
141
+
142
+ void HardwareTimer::enableDMA (int channel) {
143
+ timer_dma_enable_req (this ->dev , (uint8)channel);
144
+ }
145
+
146
+ void HardwareTimer::disableDMA (int channel) {
147
+ timer_dma_disable_req (this ->dev , (uint8)channel);
148
+ }
149
+
141
150
void HardwareTimer::refresh (void ) {
142
151
timer_generate_update (this ->dev );
143
152
}
Original file line number Diff line number Diff line change @@ -245,6 +245,12 @@ class HardwareTimer {
245
245
246
246
/* Escape hatch */
247
247
248
+ /* *
249
+ * @brief Enable/disable DMA request for the input channel.
250
+ */
251
+ void enableDMA (int channel);
252
+ void disableDMA (int channel);
253
+
248
254
/* *
249
255
* @brief Get a pointer to the underlying libmaple timer_dev for
250
256
* this HardwareTimer instance.
You can’t perform that action at this time.
0 commit comments