File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,12 @@ static void Capture(void) {
5858 SetBUFFER_IDX (i , & BUFFER [i * GetSAMPLES_REQUESTED ()]);
5959 }
6060
61+ SetCONVERSION_DONE (0 );
6162 SetSAMPLES_CAPTURED (0 );
6263 SetBUFFER_IDX (0 , & BUFFER [0 ]);
6364 SetTimeGap ();
65+ ADC1_InterruptFlagClear ();
66+ ADC1_InterruptEnable ();
6467 LED_SetLow ();
6568}
6669
@@ -82,7 +85,8 @@ response_t OSCILLOSCOPE_CaptureDMA(void) {
8285 DMA_InterruptEnable (DMA_CHANNEL_0 );
8386 DMA_ChannelEnable (DMA_CHANNEL_0 );
8487
85- SetSAMPLES_CAPTURED (GetSAMPLES_REQUESTED ()); // Assume it's all over already.
88+ SetSAMPLES_CAPTURED (GetSAMPLES_REQUESTED ());
89+ SetCONVERSION_DONE (1 ); // Assume it's all over already.
8690 SetTimeGap ();
8791 LED_SetLow ();
8892
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ static uint16_t DELAY;
6161void SetDELAY (uint16_t V ) { DELAY = V ; }
6262uint16_t GetDELAY (void ) { return DELAY ; }
6363
64- static uint8_t CONVERSION_DONE = 1 ;
64+ static uint8_t volatile CONVERSION_DONE = 1 ;
6565void SetCONVERSION_DONE (uint8_t V ) { CONVERSION_DONE = V ; }
6666uint8_t GetCONVERSION_DONE (void ) { return CONVERSION_DONE ; }
6767
You can’t perform that action at this time.
0 commit comments