Skip to content
Snippets Groups Projects
Commit 93f8bfc3 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Remove unused comments.

parent 6122650b
Branches
Tags
No related merge requests found
......@@ -483,42 +483,12 @@ uint8_t lsv_experiment(int16_t start, int16_t stop, uint16_t slope, int8_t first
printf("ERR: Frequency/ADC rate is too low\n\r");
return ret;
}
//printf("Period:%lu\n\r", timer_period);
ads1255_wakeup();
tc_write_period(&TCC1, 0xffff);
tc_write_period(&TCC0, (uint16_t)timer_period);
// //DMA
// struct dma_channel_config dmach_conf;
// memset(&dmach_conf, 0, sizeof(dmach_conf));
//
// dma_channel_set_burst_length(&dmach_conf, DMA_CH_BURSTLEN_1BYTE_gc);
// dma_channel_set_transfer_count(&dmach_conf, 1);
//
// dma_channel_set_src_reload_mode(&dmach_conf, DMA_CH_SRCRELOAD_TRANSACTION_gc);
// dma_channel_set_dest_reload_mode(&dmach_conf, DMA_CH_DESTRELOAD_NONE_gc);
//
// dma_channel_set_src_dir_mode(&dmach_conf, DMA_CH_SRCDIR_FIXED_gc);
// dma_channel_set_source_address(&dmach_conf, (uint16_t)(uintptr_t)&TCC1.CNTH);
//
// dma_channel_set_dest_dir_mode(&dmach_conf, DMA_CH_DESTDIR_FIXED_gc);
// dma_channel_set_destination_address(&dmach_conf, (uint16_t)(uintptr_t)&USARTC1.DATA);
//
// dma_channel_set_trigger_source(&dmach_conf, DMA_CH_TRIGSRC_OFF_gc);
// dma_channel_set_single_shot(&dmach_conf);
//
// dma_set_callback(0, (dma_callback_t)lsv_dma_callback);
// dma_channel_set_interrupt_level(&dmach_conf, DMA_INT_LVL_HI);
//
// dma_channel_write_config(0, &dmach_conf);
//
// dma_set_callback(1, (dma_callback_t)lsv_dma_callback1);
// dma_channel_set_source_address(&dmach_conf, (uint16_t)(uintptr_t)&TCC1.CNTL);
// dma_channel_write_config(1, &dmach_conf);
}
//
// dma_channel_enable(0);
TCC1.CNT = dacindex_start;
......
......@@ -37,8 +37,7 @@ int8_t command_handler(char command){
ads1255_setup(o1, o2, o3);
break;
case 'G': //Gain - start gain, autogain on/off, (min gain, max gain), low/high switch thresholds
//scanf("%1u%1u%7li%7li",&g_gain,&autogain_enable,&overcurrent_threshold,&undercurrent_threshold);
case 'G': //Gain
scanf("%u",&g_gain);
printf("#G: %u\r\n", g_gain);
pot_set_gain(); //uses global g_gain, so no params
......
......@@ -55,8 +55,6 @@ void max5443_set_voltage1(uint16_t dacindex){
uint16_t ui16;
} buffer;
// if (buffer.ui16 == dacindex)
// return;
if (max5443_offset < 0)
{
max5443_offset = abs(max5443_offset);
......@@ -70,14 +68,6 @@ void max5443_set_voltage1(uint16_t dacindex){
else
buffer.ui16 = dacindex + (uint16_t)max5443_offset;
// if (65535-dacindex < max5443_offset)
// buffer.ui16 = 65535;
// else if (dacindex < (uint16_t)(-1*max5443_offset))
// buffer.ui16 = 0;
// else
// buffer.ui16 = dacindex+max5443_offset;
irqflags_t flags;
flags = cpu_irq_save();
......@@ -90,22 +80,3 @@ void max5443_set_voltage1(uint16_t dacindex){
return;
}
// void max5443_set_voltage_8bit(uint8_t dacindex){
// spi_select_device(&SPIC, &spi_device_conf_c);
// spi_write_single(&SPIC, dacindex);
// spi_deselect_device(&SPIC, &spi_device_conf_c);
// return;
// }
/*void max5443_set_voltage(uint8_t msb, uint8_t lsb){
irqflags_t flags;
flags = cpu_irq_save();
spi_select_device(&SPIC, &spi_device_conf_c);
spi_write_single(&SPIC, msb);
spi_write_single(&SPIC, lsb);
spi_deselect_device(&SPIC, &spi_device_conf_c);
cpu_irq_restore(flags);
}*/
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment