Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of priustroller by
Diff: isr.cpp
- Revision:
- 31:86b87913d8e1
diff -r 2b6d426f3bfc -r 86b87913d8e1 isr.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/isr.cpp Sun Mar 15 02:21:32 2015 +0000
@@ -0,0 +1,17 @@
+#include "includes.h"
+
+extern "C" void TIM2_IRQn_Handler() {
+ TIM2->SR &= ~1;
+ ADC1->SQR1 &= ~ADC_SQR1_L;
+ ADC1->SQR3 = 0;
+ ADC1->SQR3 |= channel_ib;
+ ADC1->CR2 |= ADC_CR2_SWSTART;
+ while ((ADC1->SR & 2) == 0){}
+ global_ib = ADC1->DR;
+
+ ADC1->SQR3 = 0;
+ ADC1->SQR3 |= channel_ic;
+ ADC1->CR2 |= ADC_CR2_SWSTART;
+ while ((ADC1->SR & 2) == 0){}
+ global_ic = ADC1->DR;
+}
\ No newline at end of file
