aboutsummaryrefslogtreecommitdiff
path: root/src/pld/ecp2_3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pld/ecp2_3.c')
-rw-r--r--src/pld/ecp2_3.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pld/ecp2_3.c b/src/pld/ecp2_3.c
index a7b7580..5dfea9a 100644
--- a/src/pld/ecp2_3.c
+++ b/src/pld/ecp2_3.c
@@ -304,3 +304,14 @@ int lattice_ecp2_3_get_facing_read_bits(struct lattice_pld_device *pld_device_in
return ERROR_OK;
}
+
+int lattice_ecp2_3_refresh(struct lattice_pld_device *lattice_device)
+{
+ if (!lattice_device || !lattice_device->tap)
+ return ERROR_FAIL;
+
+ int retval = lattice_set_instr(lattice_device->tap, LSCC_REFRESH, TAP_IDLE);
+ if (retval != ERROR_OK)
+ return retval;
+ return jtag_execute_queue();
+}