Skip to content
Snippets Groups Projects
Commit 1caed97d authored by Juan David Gonzalez Cobas's avatar Juan David Gonzalez Cobas
Browse files

cvorbtest: enhance decoding of channel status

parent 83e63fe8
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,10 @@ enum cvorb_input_polarity {
*/
#define CVORB_CH_BUSY 0x1
#define CVORB_CH_FCN_PAUSED 0x2
#define CVORB_CH_FCN_NOT_USED 0x4
#define CVORB_CH_FCN_WAITING_START 0x8
#define CVORB_CH_SERIAL_LINK_ERR 0x10
#define CVORB_CH_WAVEFORM_COPY 0x100
/**
* @brief Function Vectors
......
......@@ -105,6 +105,10 @@ int h_ch_status(struct cmd_desc *cmdd, struct atom *atoms)
printf("\tWaveform paused\n");
if (ch_status & CVORB_CH_SERIAL_LINK_ERR)
printf("\tSerial link in fault\n");
if (ch_status & CVORB_CH_FCN_WAITING_START)
printf("\tIdle (waiting for start pulse)\n");
if (ch_status & CVORB_CH_WAVEFORM_COPY)
printf("\tWaveform copy in progress\n");
printf("\tChannel state machine details:\n");
/* Extract the bit field channel state in order to use it as an index in the state messages*/
ch_state = (ch_status >> CVORB_CH_STATE_SHIFT) & CVORB_CH_STATE_MASK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment