/*-----------------------------------------------------------------------------------
!
!                              COPYRIGHT 2015 BY
!                            MegaChips Corporation
!
!------------------------------------------------------------------------------------
! These coded instructions, statements, and computer programs include
! intellectual property and know-how belonging to MegaChips
! Corporaiton ("MCC") and its partner companies.
! Therefore, do not use these specifications for any purpose other than
! the purpose
! expressly agreed to by MCCs customer and MCC.  Also, do not duplicate,
! copy,
! or reproduce these specifications, nor reveal these specifications to
! any third party
! without MCCs prior written consent.
!
*/
/*-----------------------------------------------------------------------------------
  FILE        : dma_reg.c
  DESCRIPTION : DMA Register
  Revision    : $Rev: 4 $
  Author      : $Author: shirait $
  Date        : $Date: 2015-09-09 15:19:58 +0900 (水, 09 9 2015) $
-----------------------------------------------------------------------------------*/
#ifndef ___DMA_REG_H_INCLUDED___
#define ___DMA_REG_H_INCLUDED___

#include <stdint.h>

#define DMA_REG_BASE (0x4000A000u)

typedef struct _tagDmaReg {
	uint32_t en;
	uint32_t dir;
	uint32_t tcnt;
	uint32_t tsize;
	uint32_t status;

} DmaReg;

#define DMAR (*(volatile DmaReg*)(DMA_REG_BASE))

#define DMAR_EN_START (0x00000001u)
#define DMAR_EN_STOP  (0x00000000u)

#define DMAR_DIR_E2F (0x00000000u)
#define DMAR_DIR_F2E (0x00000001u)


#define DMAR_SIZE_64Byte   (0x00000000u)
#define DMAR_SIZE_512Byte  (0x00000001u)


#endif // ___DMA_REG_H_INCLUDED___
