Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (63 sloc) 2.22 KB
// Filename: regdefs.h
// Project: Debouncer project, a learning project to learn the impact
// of bouncing on logic within your device.
// Purpose: To define the registers found within the debugging bus on this
// project, as well as to locate them in the address space. This
// file is used by any C++ or other high level language program interacting
// with the project.
// Creator: Dan Gisselquist, Ph.D.
// Gisselquist Technology, LLC
// Copyright (C) 2017, Gisselquist Technology, LLC
// This program is free software (firmware): you can redistribute it and/or
// modify it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
// You should have received a copy of the GNU General Public License along
// with this program. (It's in the $(ROOT)/doc directory. Run make with no
// target there if the PDF file isn't present.) If not, see
// <> for a copy.
// License: GPL, v3, as defined and found on,
#ifndef REGDEFS_H
#define REGDEFS_H
#define R_VERSION 0x00002040
#define R_SOMETHING 0x00002044
#define R_BUSERR 0x00002048
#define R_PWRCOUNT 0x0000204c
#define R_INT 0x00002050
#define R_TRANSITIONS 0x00002058
#define R_MAXCLOCKS 0x0000205c
#define R_DEBOUNCED 0x00002060
#define R_SCOPE 0x00002080
#define R_SCOPD 0x00002084
typedef struct {
unsigned m_addr;
const char *m_name;
extern const REGNAME *bregs;
extern const int NREGS;
// #define NREGS (sizeof(bregs)/sizeof(bregs[0]))
extern unsigned addrdecode(const char *v);
extern const char *addrname(const unsigned v);
#endif // REGDEFS_H