2005-06-02 Branislav Petrovsky <brano111@szm.sk>

* h8/h83048/rc.h: New file.
	* h8/h83048/tpc.h: Ditto.
	* h8/h83048/wdt.h: Ditto.
	* Makefile.am (nobase_openwinceinc_HEADERS): Added new files.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@639 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Branislav Petrovsk 20 years ago
parent c5caec0269
commit e218e16dca

@ -1,3 +1,10 @@
2005-06-02 Branislav Petrovsky <brano111@szm.sk>
* h8/h83048/rc.h: New file.
* h8/h83048/tpc.h: Ditto.
* h8/h83048/wdt.h: Ditto.
* Makefile.am (nobase_openwinceinc_HEADERS): Added new files.
2005-06-02 Branislav Petrovsky <brano111@szm.sk>
* h8/h8s2357/wdt.h (TCSR_OWF): Constant renamed to ...

@ -94,7 +94,10 @@ nobase_openwinceinc_HEADERS = \
h8/h83048/itu.h \
h8/h83048/other.h \
h8/h83048/ports.h \
h8/h83048/rc.h \
h8/h83048/sci.h \
h8/h83048/tpc.h \
h8/h83048/wdt.h \
h8/h8s2357/adc.h \
h8/h8s2357/bus.h \
h8/h8s2357/dac.h \

@ -0,0 +1,90 @@
/*
* $Id$
*
* H8/3048 Refresh Controller (RC) Registers
* Copyright (C) 2005 Elcom s.r.o.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Written by Branislav Petrovsky <brano111@szm.sk>, 2005.
*
* Documentation:
* [1] Renesas Technology Corp., "Hitachi Single-Chip Microcomputer
* H8/3048 Series, H8/3048F-ZTAT Hardware Manual",
* Rev. 6.0, 9/3/2002, Order Number: ADE-602-073E
*
*/
#ifndef H83048_RC_H
#define H83048_RC_H
#include <common.h>
#if LANGUAGE == C
#include <stdint.h>
#endif
/* RC registers */
#define RC_BASE 0xffffac
#if LANGUAGE == C
typedef struct RC_registers {
uint8_t rfshcr;
uint8_t rtmcsr;
uint8_t rtcnt;
uint8_t rtcor;
} RC_registers_t;
#define RC_pointer ((RC_registers_t*) RC_BASE)
#define RFSHCR RC_pointer->rfshcr
#define RTMCSR RC_pointer->rtmcsr
#define RTCNT RC_pointer->rtcnt
#define RTCOR RC_pointer->rtcor
#endif /* LANGUAGE == C */
#define RFSHCR_OFFSET 0x00
#define RTMCSR_OFFSET 0x01
#define RTCNT_OFFSET 0x02
#define RTCOR_OFFSET 0x03
/* RFSHCR bits */
#define RFSHCR_SRFMD bit(7)
#define RFSHCR_PSRAME bit(6)
#define RFSHCR_DRAME bit(5)
#define RFSHCR_CASWE bit(4)
#define RFSHCR_M9M8 bit(3)
#define RFSHCR_RFSHE bit(2)
#define RFSHCR_RCYCE bit(0)
/* RTMCSR bits */
#define RTMCSR_CMF bit(7)
#define RTMCSR_CMIE bit(6)
#define RTMCSR_CKS_MASK bits(5,3)
#define RTMCSR_CKS(x) bits_val(5,3,x)
#define get_RTMCSR_CKS(x) bits_get(5,3,x)
#endif /* H83048_RC_H */

@ -0,0 +1,146 @@
/*
* $Id$
*
* H8/3048 TPC Registers
* Copyright (C) 2005 Elcom s.r.o.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Written by Branislav Petrovsky <brano111@szm.sk>, 2005.
*
* Documentation:
* [1] Renesas Technology Corp., "Hitachi Single-Chip Microcomputer
* H8/3048 Series, H8/3048F-ZTAT Hardware Manual",
* Rev. 6.0, 9/3/2002, Order Number: ADE-602-073E
*
*/
#ifndef H83048_TPC_H
#define H83048_TPC_H
#include <common.h>
#if LANGUAGE == C
#include <stdint.h>
#endif
/* TPC registers */
#define TPC_BASE 0xffffa0
#if LANGUAGE == C
typedef struct TPC_registers {
uint8_t tpmr;
uint8_t tpcr;
uint8_t nderb;
uint8_t ndera;
uint8_t ndrb;
uint8_t ndra;
uint8_t ndrb_d;
uint8_t ndra_d;
} TPC_registers_t;
#define TPC_pointer ((TPC_registers_t*) TPC_BASE)
#define TPMR TPC_pointer->tpmr
#define TPCR TPC_pointer->tpcr
#define NDERB TPC_pointer->nderb
#define NDERA TPC_pointer->ndera
#define NDRB TPC_pointer->ndrb
#define NDRA TPC_pointer->ndra
#define NDRB_D TPC_pointer->ndrb_d
#define NDRA_D TPC_pointer->ndra_d
#endif /* LANGUAGE == C */
#define TPMR_OFFSET 0x00
#define TPCR_OFFSET 0x01
#define NDERB_OFFSET 0x02
#define NDERA_OFFSET 0x03
#define NDRB_OFFSET 0x04
#define NDRA_OFFSET 0x05
#define NDRB_D_OFFSET 0x06
#define NDRA_D_OFFSET 0x07
/* TPMR bits */
#define TPMR_G3NOV bit(3)
#define TPMR_G2NOV bit(2)
#define TPMR_G1NOV bit(1)
#define TPMR_G0NOV bit(0)
/* TPCR bits */
#define TPCR_G3CMS_MASK bits(7,6)
#define TPCR_G3CMS(x) bits_val(7,6,x)
#define get_TPCR_G3CMS(x) bits_get(7,6,x)
#define TPCR_G2CMS_MASK bits(5,4)
#define TPCR_G2CMS(x) bits_val(5,4,x)
#define get_TPCR_G2CMS(x) bits_get(5,4,x)
#define TPCR_G1CMS_MASK bits(3,2)
#define TPCR_G1CMS(x) bits_val(3,2,x)
#define get_TPCR_G1CMS(x) bits_get(3,2,x)
#define TPCR_G0CMS_MASK bits(1,0)
#define TPCR_G0CMS(x) bits_val(1,0,x)
#define get_TPCR_G0CMS(x) bits_get(1,0,x)
/* NDERB bits */
#define NDERB_NDER15 bit(7)
#define NDERB_NDER14 bit(6)
#define NDERB_NDER13 bit(5)
#define NDERB_NDER12 bit(4)
#define NDERB_NDER11 bit(3)
#define NDERB_NDER10 bit(2)
#define NDERB_NDER9 bit(1)
#define NDERB_NDER8 bit(0)
/* NDERA bits */
#define NDERA_NDER7 bit(7)
#define NDERA_NDER6 bit(6)
#define NDERA_NDER5 bit(5)
#define NDERA_NDER4 bit(4)
#define NDERA_NDER3 bit(3)
#define NDERA_NDER2 bit(2)
#define NDERA_NDER1 bit(1)
#define NDERA_NDER0 bit(0)
/* NDRB bits */
#define NDRB_NDR15 bit(7)
#define NDRB_NDR14 bit(6)
#define NDRB_NDR13 bit(5)
#define NDRB_NDR12 bit(4)
#define NDRB_NDR11 bit(3)
#define NDRB_NDR10 bit(2)
#define NDRB_NDR9 bit(1)
#define NDRB_NDR8 bit(0)
/* NDRA bits */
#define NDRA_NDR7 bit(7)
#define NDRA_NDR6 bit(6)
#define NDRA_NDR5 bit(5)
#define NDRA_NDR4 bit(4)
#define NDRA_NDR3 bit(3)
#define NDRA_NDR2 bit(2)
#define NDRA_NDR1 bit(1)
#define NDRA_NDR0 bit(0)
#endif /* H83048_TPC_H */

@ -0,0 +1,104 @@
/*
* $Id$
*
* H8/3048 WDT Registers
* Copyright (C) 2005 Elcom s.r.o.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Written by Branislav Petrovsky <brano111@szm.sk>, 2005.
*
* Documentation:
* [1] Renesas Technology Corp., "Hitachi Single-Chip Microcomputer
* H8/3048 Series, H8/3048F-ZTAT Hardware Manual",
* Rev. 6.0, 9/3/2002, Order Number: ADE-602-073E
*
*/
#ifndef H83048_WDT_H
#define H83048_WDT_H
#include <common.h>
#if LANGUAGE == C
#include <stdint.h>
#endif
/* WDT registers */
#define WDT_BASE 0xffffa8
#if LANGUAGE == C
typedef struct WDT_registers {
union {
union {
uint16_t tcsr;
uint16_t tcnt;
} _write;
struct {
uint8_t tcsr;
uint8_t tcnt;
} _read;
} _timer;
union {
union {
uint16_t rstcsr;
} _write;
struct {
uint8_t __reserved;
uint8_t rstcsr;
} _read;
} _rstcsr;
} WDT_registers_t;
#define WDT_pointer ((WDT_registers_t*) WDT_BASE)
#define TCSR_r WDT_pointer->_timer._read.tcsr
#define TCNT_r WDT_pointer->_timer._read.tcnt
#define RSTCSR_r WDT_pointer->_rstcsr._read.rstcsr
#define TCSR_w WDT_pointer->_timer._write.tcsr
#define TCNT_w WDT_pointer->_timer._write.tcnt
#define RSTCSR_w WDT_pointer->_rstcsr._write.rstcsr
#endif /* LANGUAGE == C */
#define TCSR_OFFSET 0x00
#define TCNT_OFFSET_w 0x00
#define TCNT_OFFSET_r 0x01
#define RSTCSR_OFFSET_w 0x02
#define RSTCSR_OFFSET_r 0x03
/* TCSR bits */
#define TCSR_OVF bit(7)
#define TCSR_WTIT bit(6)
#define TCSR_TME bit(5)
#define TCSR_CKS_MASK bits(2,0)
#define TCSR_CKS(x) bits_val(2,0,x)
#define get_TCSR_CKS(x) bits_get(2,0,x)
/* RSTCSR bits */
#define RSTCSR_WRST bit(7)
#define RSTCSR_RSTOE bit(6)
#endif /* H83048_WDT_H */
Loading…
Cancel
Save