| | |
| | | if (stb & sre) { |
| | | ptrans = ((old_val ^ val) & val); |
| | | context->registers[SCPI_REG_STB] |= STB_SRQ; |
| | | if (ptrans & val) { |
| | | if (ptrans & val) |
| | | { |
| | | writeControl(context, SCPI_CTRL_SRQ, context->registers[SCPI_REG_STB]); |
| | | } |
| | | } else { |
| | | } else |
| | | { |
| | | context->registers[SCPI_REG_STB] &= ~STB_SRQ; |
| | | } |
| | | break; |
| | |
| | | */ |
| | | scpi_result_t SCPI_CoreIdnQ(scpi_t * context) { |
| | | int i; |
| | | for (i = 0; i < 4; i++) { |
| | | if (context->idn[i]) { |
| | | for (i = 0; i < 4; i++) |
| | | { |
| | | if (context->idn[i]) |
| | | { |
| | | char* outPut = "IDNS响应"; |
| | | memcpy(context->outPut,outPut,strlen(outPut)); |
| | | context->interface->write(context,context->idn[i],0); |
| | | SCPI_ResultMnemonic(context, context->idn[i]); |
| | | } else { |
| | | SCPI_ResultMnemonic(context, "0"); |
| | |
| | | * @param context |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreSreQ(scpi_t * context) { |
| | | SCPI_ResultInt32(context, SCPI_RegGet(context, SCPI_REG_SRE)); |
| | | scpi_result_t SCPI_CoreSreQ(scpi_t * context) |
| | | { |
| | | context->interface->write(context,"Registers request start",0); |
| | | for(int i =0;i<SCPI_REG_COUNT;i++) |
| | | { |
| | | context->interface->write(context,(char*)context->registers[i],0); |
| | | } |
| | | context->interface->write(context,"Registers request end",0); |
| | | return SCPI_RES_OK; |
| | | } |
| | | |