STATUS_FLAG_MASK = 0x3F
};
-/** LWLA register addresses.
+/** LWLA1034 register addresses.
*/
enum {
- REG_MEM_CTRL2 = 0x1074, /* capture buffer control ??? */
+ REG_MEM_CTRL = 0x1074, /* capture buffer control */
REG_MEM_FILL = 0x1078, /* capture buffer fill level */
- REG_MEM_CTRL4 = 0x107C, /* capture buffer control ??? */
+ REG_MEM_START = 0x107C, /* capture buffer start address */
REG_DIV_BYPASS = 0x1094, /* bypass clock divider flag */
REG_FREQ_CH4 = 0x10CC, /* channel 4 live frequency */
};
+/** Flag bits for REG_MEM_CTRL.
+ */
+enum {
+ MEM_CTRL_WRITE = 1 << 0, /* "wr1rd0" bit */
+ MEM_CTRL_CLR_IDX = 1 << 1, /* "clr_idx" bit */
+};
+
/** Register/value pair.
*/
struct regval_pair {
regvals[0].reg = REG_DIV_BYPASS;
regvals[0].val = 1;
- regvals[1].reg = REG_MEM_CTRL2;
- regvals[1].val = 2;
+ regvals[1].reg = REG_MEM_CTRL;
+ regvals[1].val = MEM_CTRL_CLR_IDX;
- regvals[2].reg = REG_MEM_CTRL4;
+ regvals[2].reg = REG_MEM_START;
regvals[2].val = 4;
devc->reg_write_pos = 0;
return ret;
if (value != UINT64_C(0x1234567887654321)) {
- sr_err("Received invalid test word 0x%16" PRIX64 ".", value);
+ sr_err("Received invalid test word 0x%016" PRIX64 ".", value);
return SR_ERR;
}
return SR_OK;
sr_info("External clock, rising edge.");
}
- regvals[0].reg = REG_MEM_CTRL2;
- regvals[0].val = 2;
+ regvals[0].reg = REG_MEM_CTRL;
+ regvals[0].val = MEM_CTRL_CLR_IDX;
- regvals[1].reg = REG_MEM_CTRL2;
- regvals[1].val = 1;
+ regvals[1].reg = REG_MEM_CTRL;
+ regvals[1].val = MEM_CTRL_WRITE;
regvals[2].reg = REG_LONG_ADDR;
regvals[2].val = 10;