FreeCalypso > hg > fc-rfcal-tools
annotate cmu200/mode.c @ 10:34a66394bea0
cmu200/logs/read-mod-response: log saved
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 May 2017 18:57:44 +0000 |
parents | b552e8d86474 |
children | 8877634feba5 |
rev | line source |
---|---|
3
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * In this module we are going to implement the logic for switching |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * the CMU200 into different modes as needed for signal generation, |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * frequency measurement etc. |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 */ |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include "mode.h" |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 int current_mode; |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 cmu200_session_begin() |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 { |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 current_mode = OP_MODE_UNDEF; |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 } |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 stop_signal_gen() |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 { |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 if (current_mode == OP_MODE_SIGNAL_GEN) |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 send_scpi_cmd("ABORT:RFG\n"); |
b552e8d86474
fc-cmu200d: started implementing operation modes
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 } |