|
@@ -45,13 +45,7 @@ void handleFreqCmd(const char* recvBuff)
|
|
|
double lmx_freq = 0;
|
|
double lmx_freq = 0;
|
|
|
|
|
|
|
|
splitLexeme(recvBuff, freq, sizeof(freq[0]), convertToDouble);
|
|
splitLexeme(recvBuff, freq, sizeof(freq[0]), convertToDouble);
|
|
|
- // usleep(1);
|
|
|
|
|
- uint32_t cfg_reg = get_cfg_reg();
|
|
|
|
|
- SET_REGISTER_PARAM(cfg_reg, CFG_REG_SPI_MODE_BITM, CFG_REG_SPI_MODE_BITP, CFG_REG_SPI_MODE_4MOSI);
|
|
|
|
|
- uint32_t *spi_mode = bar1 +CFG_REG_ADDR;
|
|
|
|
|
- *spi_mode = cfg_reg;
|
|
|
|
|
-
|
|
|
|
|
- set_cfg_reg(cfg_reg);
|
|
|
|
|
|
|
+
|
|
|
potentiometer_set_qspi((uint8_t) offsetCode[0], (uint8_t) slopeCode[0]);
|
|
potentiometer_set_qspi((uint8_t) offsetCode[0], (uint8_t) slopeCode[0]);
|
|
|
lmx_freq = lmx_get_freq(freq[0]);
|
|
lmx_freq = lmx_get_freq(freq[0]);
|
|
|
f_pd = ad9912_set(bar1, lmx_freq, f_pd);
|
|
f_pd = ad9912_set(bar1, lmx_freq, f_pd);
|
|
@@ -142,13 +136,6 @@ void handleArmCmd(const char* recvBuff)
|
|
|
|
|
|
|
|
splitLexeme(recvBuff, armCode, sizeof(armCode[0]), convertToUInt16);
|
|
splitLexeme(recvBuff, armCode, sizeof(armCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", armCode[0]);
|
|
printf("\n%u\n", armCode[0]);
|
|
|
-
|
|
|
|
|
- uint32_t cfg_reg = get_cfg_reg();
|
|
|
|
|
- SET_REGISTER_PARAM(cfg_reg, CFG_REG_SPI_MODE_BITM, CFG_REG_SPI_MODE_BITP, CFG_REG_SPI_MODE_4MOSI);
|
|
|
|
|
- uint32_t *spi_mode = bar1 +CFG_REG_ADDR;
|
|
|
|
|
- *spi_mode = cfg_reg;
|
|
|
|
|
- set_cfg_reg(cfg_reg);
|
|
|
|
|
-
|
|
|
|
|
dac8811_set_qspi(bar1,armCode[0]);
|
|
dac8811_set_qspi(bar1,armCode[0]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -158,13 +145,6 @@ void handleAttCmd(const char* recvBuff)
|
|
|
|
|
|
|
|
splitLexeme(recvBuff, attCode, sizeof(attCode[0]), convertToUInt16);
|
|
splitLexeme(recvBuff, attCode, sizeof(attCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", attCode[0]);
|
|
printf("\n%u\n", attCode[0]);
|
|
|
-
|
|
|
|
|
- uint32_t cfg_reg = get_cfg_reg();
|
|
|
|
|
- SET_REGISTER_PARAM(cfg_reg, CFG_REG_SPI_MODE_BITM, CFG_REG_SPI_MODE_BITP, CFG_REG_SPI_MODE_4MOSI);
|
|
|
|
|
- uint32_t *spi_mode = bar1 +CFG_REG_ADDR;
|
|
|
|
|
- *spi_mode = cfg_reg;
|
|
|
|
|
- set_cfg_reg(cfg_reg);
|
|
|
|
|
-
|
|
|
|
|
dac8811_att_set_qspi(bar1, attCode[0]);
|
|
dac8811_att_set_qspi(bar1, attCode[0]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -182,11 +162,6 @@ void handleOffsetCmd(const char* recvBuff)
|
|
|
|
|
|
|
|
splitLexeme(recvBuff, offsetCode, sizeof(offsetCode[0]), convertToUInt16);
|
|
splitLexeme(recvBuff, offsetCode, sizeof(offsetCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", offsetCode[0]);
|
|
printf("\n%u\n", offsetCode[0]);
|
|
|
- uint32_t cfg_reg = get_cfg_reg();
|
|
|
|
|
- SET_REGISTER_PARAM(cfg_reg, CFG_REG_SPI_MODE_BITM, CFG_REG_SPI_MODE_BITP, CFG_REG_SPI_MODE_4MOSI);
|
|
|
|
|
- uint32_t *spi_mode = bar1 +CFG_REG_ADDR;
|
|
|
|
|
- *spi_mode = cfg_reg;
|
|
|
|
|
- set_cfg_reg(cfg_reg);
|
|
|
|
|
potentiometer_set_offset(bar1, offsetCode[0]);
|
|
potentiometer_set_offset(bar1, offsetCode[0]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -195,11 +170,6 @@ void handleSlopeCmd(const char* recvBuff)
|
|
|
printf("\nHandle command \"TMSG44:SLOPE\"\n");
|
|
printf("\nHandle command \"TMSG44:SLOPE\"\n");
|
|
|
splitLexeme(recvBuff, slopeCode, sizeof(slopeCode[0]), convertToUInt16);
|
|
splitLexeme(recvBuff, slopeCode, sizeof(slopeCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", slopeCode[0]);
|
|
printf("\n%u\n", slopeCode[0]);
|
|
|
- uint32_t cfg_reg = get_cfg_reg();
|
|
|
|
|
- SET_REGISTER_PARAM(cfg_reg, CFG_REG_SPI_MODE_BITM, CFG_REG_SPI_MODE_BITP, CFG_REG_SPI_MODE_4MOSI);
|
|
|
|
|
- uint32_t *spi_mode = bar1 +CFG_REG_ADDR;
|
|
|
|
|
- *spi_mode = cfg_reg;
|
|
|
|
|
- set_cfg_reg(cfg_reg);
|
|
|
|
|
potentiometer_set_slope(bar1, slopeCode[0]);
|
|
potentiometer_set_slope(bar1, slopeCode[0]);
|
|
|
}
|
|
}
|
|
|
|
|
|