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

Added PC handshake.

parent a1019d11
Branches
Tags
No related merge requests found
......@@ -19,7 +19,8 @@ int8_t command_handler(char command);
int8_t command_handler(char command){
switch (command){
case 'A': //ADS Buffer/rate/PGA
scanf("%hX%hX%hX",o1,o2,o3);
scanf("%X%X%X",o1,o2,o3);
//Sanity check goes here
ads1255_setup(o1, o2, o3);
break;
case 'G': //Gain - start gain, autogain on/off, min gain, max, gain, low/high switch thresholds
......@@ -70,22 +71,19 @@ int main(void){
max5443_init_module();
delay_ms(300);
uint16_t input;
ads1255_wakeup();
ads1255_rdatac();
ads1255_standby();
//Wait for application connection - Get 'c', reply 'K', get 'k'
while(1){
while(getchar() != 'c');
putchar('K');
if (getchar() == 'k')
break;
}
while (1){
printf("Choose Experiment type:\n\r");
printf("Options:0, LSV:1, CV:2, SWV:3, AMP:4, EIS:5\n\r");
printf("DStat v1.1 27 Aug 2012\n\r");
scanf("%u", &input);
getchar();
command_handler((char)getchar());
}
}
\ No newline at end of file
No preview for this file type
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