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) {
138138 timer_detach_interrupt (this ->dev , (uint8)channel);
139139}
140140
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+
141150void HardwareTimer::refresh (void ) {
142151 timer_generate_update (this ->dev );
143152}
Original file line number Diff line number Diff line change @@ -245,6 +245,12 @@ class HardwareTimer {
245245
246246 /* Escape hatch */
247247
248+ /* *
249+ * @brief Enable/disable DMA request for the input channel.
250+ */
251+ void enableDMA (int channel);
252+ void disableDMA (int channel);
253+
248254 /* *
249255 * @brief Get a pointer to the underlying libmaple timer_dev for
250256 * this HardwareTimer instance.
You can’t perform that action at this time.
0 commit comments