/*******************************************************************************
 * Copyright (c) 2018-2021 Renesas Electronics Corporation. All rights reserved.
 *
 *     RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
 *
 * This software is provided as reference/sample code under the license
 * agreement between Renesas Electronics Corporation and licensee (the
 * "License Agreement") and shall be treated as specified in the License
 * Agreement.
 * These instructions, statements, and software are the confidential
 * information of Renesas Electronics Corporation. They must be used and
 * modified solely for the purpose for which it was furnished by Renesas
 * Electronics Corporation. All or part of these instructions, statements and
 * software must not be reproduced nor disclosed to any third party in any
 * form, unless permitted by the License Agreement.
 *
 * THIS SOFTWARE IS PROVIDED BY RENESAS ELEOCTRONICS CORPORATION "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
 * SATISFACTORY QUALITY, ACCURACY, TITLE AND NON-INFRINGEMENT ARE DISCLAIMED.
 * IN NO EVENT SHALL RENESAS ELECTRONICS CORPORATION BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * 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.
 ******************************************************************************/

/*******************************************************************************
 * DESCRIPTION   : DMA register header
 ******************************************************************************/

#ifndef DMA_REGISTER_H_
#define DMA_REGISTER_H_

#include <remap_register.h>

#define DMACH   (0U)
#define BIT21   (1U << 21U)

/* RT-DMAC0(foe RPC) */
#define RTDMA_BASE  (BASE_RTDMA_ADDR)

#define DMA_RDMOR       (RTDMA_BASE + 0x0060U)  /* DMA operation register */
#define DMA_RDMSEC      (RTDMA_BASE + 0x0030U)
#define DMA_RDMCHCLR    (RTDMA_BASE + 0x0080U)  /* DMA channel clear register */

#define DMA_RDMSAR(a)   (RTDMA_BASE + 0x8000U + ((uint32_t)(a) * 0x0080U))
#define DMA_RDMDAR(a)   (RTDMA_BASE + 0x8004U + ((uint32_t)(a) * 0x0080U))
#define DMA_RDMTCR(a)   (RTDMA_BASE + 0x8008U + ((uint32_t)(a) * 0x0080U))
#define DMA_RDMCHCR(a)  (RTDMA_BASE + 0x800CU + ((uint32_t)(a) * 0x0080U))
#define DMA_RDMRS(a)    (RTDMA_BASE + 0x8040U + ((uint32_t)(a) * 0x0080U))

#endif /* DMA_REGISTER_H_ */
