#ifndef __CHEBY__VTUDIAG_REGS__H__
#define __CHEBY__VTUDIAG_REGS__H__
#define VTUDIAG_REGS_SIZE 16 /* 0x10 */

/* Control register */
#define VTUDIAG_REGS_CONTROL 0x0UL
#define VTUDIAG_REGS_CONTROL_ENABLE 0x10UL
#define VTUDIAG_REGS_CONTROL_WINDOW_MASK 0x7UL
#define VTUDIAG_REGS_CONTROL_WINDOW_SHIFT 0

/* Result number */
#define VTUDIAG_REGS_GENERATION 0x2UL

/* Frequency */
#define VTUDIAG_REGS_FREQ 0x4UL

/* Pulse counter */
#define VTUDIAG_REGS_COUNTER 0x8UL

#ifndef __ASSEMBLER__
struct vtudiag_regs {
  /* [0x0]: REG (rw) Control register */
  uint16_t control;

  /* [0x2]: REG (ro) Result number */
  uint16_t generation;

  /* [0x4]: REG (ro) Frequency */
  uint32_t freq;

  /* [0x8]: REG (ro) Pulse counter */
  uint32_t counter;

  /* padding to: 2 words */
  uint32_t __padding_0[1];
};
#endif /* !__ASSEMBLER__*/

#endif /* __CHEBY__VTUDIAG_REGS__H__ */
