/* SPDX-License-Identifier: GPL-2.0 */
/*
* File: m54xxgpt.h
* Purpose: Register and bit definitions for the MCF54XX
*
* Notes:
*
*/
#ifndef m54xxgpt_h
#define m54xxgpt_h
/*********************************************************************
*
* General Purpose Timers (GPT)
*
*********************************************************************/
/* Register read/write macros */
#define MCF_GPT_GMS0 (MCF_MBAR + 0 x000800)
#define MCF_GPT_GCIR0 (MCF_MBAR + 0 x000804)
#define MCF_GPT_GPWM0 (MCF_MBAR + 0 x000808)
#define MCF_GPT_GSR0 (MCF_MBAR + 0 x00080C)
#define MCF_GPT_GMS1 (MCF_MBAR + 0 x000810)
#define MCF_GPT_GCIR1 (MCF_MBAR + 0 x000814)
#define MCF_GPT_GPWM1 (MCF_MBAR + 0 x000818)
#define MCF_GPT_GSR1 (MCF_MBAR + 0 x00081C)
#define MCF_GPT_GMS2 (MCF_MBAR + 0 x000820)
#define MCF_GPT_GCIR2 (MCF_MBAR + 0 x000824)
#define MCF_GPT_GPWM2 (MCF_MBAR + 0 x000828)
#define MCF_GPT_GSR2 (MCF_MBAR + 0 x00082C)
#define MCF_GPT_GMS3 (MCF_MBAR + 0 x000830)
#define MCF_GPT_GCIR3 (MCF_MBAR + 0 x000834)
#define MCF_GPT_GPWM3 (MCF_MBAR + 0 x000838)
#define MCF_GPT_GSR3 (MCF_MBAR + 0 x00083C)
#define MCF_GPT_GMS(x) (MCF_MBAR + 0 x000800 + ((x) * 0 x010))
#define MCF_GPT_GCIR(x) (MCF_MBAR + 0 x000804 + ((x) * 0 x010))
#define MCF_GPT_GPWM(x) (MCF_MBAR + 0 x000808 + ((x) * 0 x010))
#define MCF_GPT_GSR(x) (MCF_MBAR + 0 x00080C + ((x) * 0 x010))
/* Bit definitions and macros for MCF_GPT_GMS */
#define MCF_GPT_GMS_TMS(x) (((x)&0 x00000007)<<0 )
#define MCF_GPT_GMS_GPIO(x) (((x)&0 x00000003)<<4 )
#define MCF_GPT_GMS_IEN (0 x00000100)
#define MCF_GPT_GMS_OD (0 x00000200)
#define MCF_GPT_GMS_SC (0 x00000400)
#define MCF_GPT_GMS_CE (0 x00001000)
#define MCF_GPT_GMS_WDEN (0 x00008000)
#define MCF_GPT_GMS_ICT(x) (((x)&0 x00000003)<<16 )
#define MCF_GPT_GMS_OCT(x) (((x)&0 x00000003)<<20 )
#define MCF_GPT_GMS_OCPW(x) (((x)&0 x000000FF)<<24 )
#define MCF_GPT_GMS_OCT_FRCLOW (0 x00000000)
#define MCF_GPT_GMS_OCT_PULSEHI (0 x00100000)
#define MCF_GPT_GMS_OCT_PULSELO (0 x00200000)
#define MCF_GPT_GMS_OCT_TOGGLE (0 x00300000)
#define MCF_GPT_GMS_ICT_ANY (0 x00000000)
#define MCF_GPT_GMS_ICT_RISE (0 x00010000)
#define MCF_GPT_GMS_ICT_FALL (0 x00020000)
#define MCF_GPT_GMS_ICT_PULSE (0 x00030000)
#define MCF_GPT_GMS_GPIO_INPUT (0 x00000000)
#define MCF_GPT_GMS_GPIO_OUTLO (0 x00000020)
#define MCF_GPT_GMS_GPIO_OUTHI (0 x00000030)
#define MCF_GPT_GMS_GPIO_MASK (0 x00000030)
#define MCF_GPT_GMS_TMS_DISABLE (0 x00000000)
#define MCF_GPT_GMS_TMS_INCAPT (0 x00000001)
#define MCF_GPT_GMS_TMS_OUTCAPT (0 x00000002)
#define MCF_GPT_GMS_TMS_PWM (0 x00000003)
#define MCF_GPT_GMS_TMS_GPIO (0 x00000004)
#define MCF_GPT_GMS_TMS_MASK (0 x00000007)
/* Bit definitions and macros for MCF_GPT_GCIR */
#define MCF_GPT_GCIR_CNT(x) (((x)&0 x0000FFFF)<<0 )
#define MCF_GPT_GCIR_PRE(x) (((x)&0 x0000FFFF)<<16 )
/* Bit definitions and macros for MCF_GPT_GPWM */
#define MCF_GPT_GPWM_LOAD (0 x00000001)
#define MCF_GPT_GPWM_PWMOP (0 x00000100)
#define MCF_GPT_GPWM_WIDTH(x) (((x)&0 x0000FFFF)<<16 )
/* Bit definitions and macros for MCF_GPT_GSR */
#define MCF_GPT_GSR_CAPT (0 x00000001)
#define MCF_GPT_GSR_COMP (0 x00000002)
#define MCF_GPT_GSR_PWMP (0 x00000004)
#define MCF_GPT_GSR_TEXP (0 x00000008)
#define MCF_GPT_GSR_PIN (0 x00000100)
#define MCF_GPT_GSR_OVF(x) (((x)&0 x00000007)<<12 )
#define MCF_GPT_GSR_CAPTURE(x) (((x)&0 x0000FFFF)<<16 )
/********************************************************************/
#endif /* m54xxgpt_h */
Messung V0.5 in Prozent C=93 H=90 G=91
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*© Formatika GbR, Deutschland