aboutsummaryrefslogtreecommitdiff
path: root/src/target/avr32_ap7k.h
blob: 6984b610137814071b5b1f1c6077e55f90a8d9c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-2.0-or-later */

/***************************************************************************
 *   Copyright (C) 2010 by Oleksandr Tymoshenko <gonzo@bluezbox.com>       *
 ***************************************************************************/

#ifndef OPENOCD_TARGET_AVR32_AP7K_H
#define OPENOCD_TARGET_AVR32_AP7K_H

struct target;

#define AP7K_COMMON_MAGIC	0x4150374b
struct avr32_ap7k_common {
	int common_magic;
	struct avr32_jtag jtag;
	struct reg_cache *core_cache;
	uint32_t core_regs[AVR32NUMCOREREGS];
};

static inline struct avr32_ap7k_common *
target_to_ap7k(struct target *target)
{
	return (struct avr32_ap7k_common *)target->arch_info;
}

struct avr32_core_reg {
	uint32_t num;
	struct target *target;
	struct avr32_ap7k_common *avr32_common;
};

#endif /* OPENOCD_TARGET_AVR32_AP7K_H */