jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / pld / lattice.h
blob9a76a4ec37cab20216dfcdaa86652cb78ac476c7
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2022 by Daniel Anselmi *
5 * danselmi@gmx.ch *
6 ***************************************************************************/
8 #ifndef OPENOCD_PLD_LATTICE_H
9 #define OPENOCD_PLD_LATTICE_H
11 #include <jtag/jtag.h>
12 #include "pld.h"
13 #include "lattice_bit.h"
15 #define BYPASS 0xFF
17 struct lattice_pld_device {
18 struct jtag_tap *tap;
19 size_t preload_length;
20 enum lattice_family_e family;
23 int lattice_set_instr(struct jtag_tap *tap, uint8_t new_instr, tap_state_t endstate);
24 int lattice_read_u32_register(struct jtag_tap *tap, uint8_t cmd, uint32_t *in_val,
25 uint32_t out_val, bool do_idle);
26 int lattice_read_u64_register(struct jtag_tap *tap, uint8_t cmd, uint64_t *in_val,
27 uint64_t out_val);
28 int lattice_verify_usercode(struct lattice_pld_device *lattice_device, uint32_t out,
29 uint32_t expected, uint32_t mask);
30 int lattice_verify_status_register_u32(struct lattice_pld_device *lattice_device, uint32_t out,
31 uint32_t expected, uint32_t mask, bool do_idle);
32 int lattice_verify_status_register_u64(struct lattice_pld_device *lattice_device, uint64_t out,
33 uint64_t expected, uint64_t mask);
34 int lattice_preload(struct lattice_pld_device *lattice_device);
36 #endif /* OPENOCD_PLD_LATTICE_H */