OpenOCD
lattice_bit.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
/***************************************************************************
4
* Copyright (C) 2022 by Daniel Anselmi *
5
* danselmi@gmx.ch *
6
***************************************************************************/
7
8
#ifndef OPENOCD_PLD_LATTICE_BIT_H
9
#define OPENOCD_PLD_LATTICE_BIT_H
10
11
#include "
helper/types.h
"
12
#include "
raw_bit.h
"
13
14
15
struct
lattice_bit_file
{
16
struct
raw_bit_file
raw_bit
;
17
size_t
offset
;
18
uint32_t
idcode
;
19
const
char
*
part
;
/* reuses memory in raw_bit_file */
20
bool
has_id
;
21
};
22
23
enum
lattice_family_e
{
24
LATTICE_ECP2
,
25
LATTICE_ECP3
,
26
LATTICE_ECP5
,
27
LATTICE_CERTUS
,
28
LATTICE_UNKNOWN
,
29
};
30
31
int
lattice_read_file
(
struct
lattice_bit_file
*bit_file,
const
char
*filename,
enum
lattice_family_e
family);
32
33
#endif
/* OPENOCD_PLD_LATTICE_BIT_H */
lattice_family_e
lattice_family_e
Definition:
lattice_bit.h:23
LATTICE_UNKNOWN
@ LATTICE_UNKNOWN
Definition:
lattice_bit.h:28
LATTICE_ECP5
@ LATTICE_ECP5
Definition:
lattice_bit.h:26
LATTICE_ECP3
@ LATTICE_ECP3
Definition:
lattice_bit.h:25
LATTICE_CERTUS
@ LATTICE_CERTUS
Definition:
lattice_bit.h:27
LATTICE_ECP2
@ LATTICE_ECP2
Definition:
lattice_bit.h:24
lattice_read_file
int lattice_read_file(struct lattice_bit_file *bit_file, const char *filename, enum lattice_family_e family)
Definition:
lattice_bit.c:88
raw_bit.h
lattice_bit_file
Definition:
lattice_bit.h:15
lattice_bit_file::offset
size_t offset
Definition:
lattice_bit.h:17
lattice_bit_file::idcode
uint32_t idcode
Definition:
lattice_bit.h:18
lattice_bit_file::has_id
bool has_id
Definition:
lattice_bit.h:20
lattice_bit_file::part
const char * part
Definition:
lattice_bit.h:19
lattice_bit_file::raw_bit
struct raw_bit_file raw_bit
Definition:
lattice_bit.h:16
raw_bit_file
Definition:
raw_bit.h:14
types.h
src
pld
lattice_bit.h
Generated by
1.9.1