Skip to content

Instantly share code, notes, and snippets.

@pamaury
Created September 16, 2015 11:05
Show Gist options
  • Save pamaury/ca956a7fc03b9744e8fa to your computer and use it in GitHub Desktop.
Save pamaury/ca956a7fc03b9744e8fa to your computer and use it in GitHub Desktop.
header file
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* This file was automatically generated by headergen, DO NOT EDIT it.
* headergen version: 3.0.0
* vsoc2000 version: 0.5
* vsoc2000 authors: Amaury Pouly
*
* Copyright (C) 2015 by the authors
*
* This program is free software; 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 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef __HEADERGEN_VSOC2000_REGS_TZ_H__
#define __HEADERGEN_VSOC2000_REGS_TZ_H__
#define HW_TZ_CTRL_ADDR (0xa0000000 + 0x0)
#define HW_TZ_CTRL (*(volatile uint8_t *)HW_TZ_CTRL_ADDR)
#define BW_TZ_CTRL(...) HW_TZ_CTRL = BF_OR(TZ_CTRL, __VA_ARGS__)
#define BR_TZ_CTRL(_f) ((HW_TZ_CTRL & BM_TZ_CTRL_##_f) & BP_TZ_CTRL_##_f)
#define BP_TZ_CTRL_SCRATCH 4
#define BM_TZ_CTRL_SCRATCH 0xf0
#define BF_TZ_CTRL_SCRATCH(_v) (((_v) << BP_TZ_CTRL_SCRATCH) & BM_TZ_CTRL_SCRATCH)
#define BF_TZ_CTRL_SCRATCH_V(_e) BF_TZ_CTRL_SCRATCH(BV_TZ_CTRL_SCRATCH__##_e)
#define BP_TZ_CTRL_DISABLE 0
#define BM_TZ_CTRL_DISABLE 0xf
#define BF_TZ_CTRL_DISABLE(_v) (((_v) << BP_TZ_CTRL_DISABLE) & BM_TZ_CTRL_DISABLE)
#define BF_TZ_CTRL_DISABLE_V(_e) BF_TZ_CTRL_DISABLE(BV_TZ_CTRL_DISABLE__##_e)
#endif /* __HEADERGEN_VSOC2000_REGS_TZ_H__*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment