3c30108690a59a63df64ef547e9677d63fd15adf
[fw/openocd] / src / target / nds32_v2.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4  *   Copyright (C) 2013 Andes Technology                                   *
5  *   Hsiangkai Wang <hkwang@andestech.com>                                 *
6  ***************************************************************************/
7
8 #ifndef OPENOCD_TARGET_NDS32_V2_H
9 #define OPENOCD_TARGET_NDS32_V2_H
10
11 #include "nds32.h"
12
13 struct nds32_v2_common {
14         struct nds32 nds32;
15
16         uint32_t backup_ir0;
17
18         /** number of hardware breakpoints */
19         int32_t n_hbr;
20
21         /** next hardware breakpoint index */
22         /** increase from low index to high index */
23         int32_t next_hbr_index;
24 };
25
26 static inline struct nds32_v2_common *target_to_nds32_v2(struct target *target)
27 {
28         return container_of(target->arch_info, struct nds32_v2_common, nds32);
29 }
30
31 #endif /* OPENOCD_TARGET_NDS32_V2_H */