 float _sweep_samp_rate = SAMPRATE_DEFAULT; //samples per second
 float _sweep_cycles  =  1;
 
+
+void sweepAbortCommand(){
+    Serial.print(F("#<ABORT />\n"));
+    _sweep_abort = true;
+}
+
 void sweepTickISR(){
   //Serial.print(F("Tick!\n"));
   _sweep_control_voltage += _sweep_voltage_step;
-  noInterrupts();           // disable all interrupts
   //change output voltage
   control_DAC.setVoltageOutput(_sweep_control_voltage + V_VGND); //shift to center-rail
-  interrupts();           // enable interrupts
 }
 
 void sweepSampleCallback(){

#define BAUDRATE 115200
#define FLOAT_PRECISION_DIGITS 9
#define FLOAT_DELTA 1e-20
#define MAXCOMMANDS 12

//Voltage sensing
#define ADC_CHANNEL_VOLTAGE 0


float _sweep_voltage_step;
volatile float _sweep_control_voltage;
volatile bool  _sweep_abort = false;

//default parameters for the sweep
float _sweep_v_start =  0;
