/**
******************************************************************************
* @file mjpeg_reg.h
* @version V1.0
* @date 2022-11-01
* @brief This file is the description of.IP register
******************************************************************************
* @attention
*
*
© COPYRIGHT(c) 2020 Bouffalo Lab
*
* 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 Bouffalo Lab 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 HOLDER 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.
*
******************************************************************************
*/
#ifndef __HARDWARE_MJPEG_REG_H__
#define __HARDWARE_MJPEG_REG_H__
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Register offsets *********************************************************/
#define MJPEG_CONTROL_1_OFFSET (0x0)/* mjpeg_control_1 */
#define MJPEG_CONTROL_2_OFFSET (0x4)/* mjpeg_control_2 */
#define MJPEG_YY_FRAME_ADDR_OFFSET (0x08)/* mjpeg_yy_frame_addr */
#define MJPEG_UV_FRAME_ADDR_OFFSET (0x0C)/* mjpeg_uv_frame_addr */
#define MJPEG_YUV_MEM_OFFSET (0x10)/* mjpeg_yuv_mem */
#define MJPEG_JPEG_FRAME_ADDR_OFFSET (0x14)/* jpeg_frame_addr */
#define MJPEG_JPEG_STORE_MEMORY_OFFSET (0x18)/* jpeg_store_memory */
#define MJPEG_CONTROL_3_OFFSET (0x1C)/* mjpeg_control_3 */
#define MJPEG_FRAME_FIFO_POP_OFFSET (0x20)/* mjpeg_frame_fifo_pop */
#define MJPEG_FRAME_SIZE_OFFSET (0x24)/* mjpeg_frame_size */
#define MJPEG_HEADER_BYTE_OFFSET (0x28)/* mjpeg_header_byte */
#define MJPEG_SWAP_MODE_OFFSET (0x30)/* mjpeg_swap_mode */
#define MJPEG_SWAP_BIT_CNT_OFFSET (0x34)/* mjpeg_swap_bit_cnt */
#define MJPEG_YUV_MEM_SW_OFFSET (0x38)/* mjpeg_yuv_mem_sw */
#define MJPEG_Y_FRAME_READ_STATUS_1_OFFSET (0x40)/* mjpeg_Y_frame_read_status_1 */
#define MJPEG_Y_FRAME_READ_STATUS_2_OFFSET (0x44)/* mjpeg_Y_frame_read_status_2 */
#define MJPEG_Y_FRAME_WRITE_STATUS_OFFSET (0x48)/* mjpeg_Y_frame_write_status */
#define MJPEG_UV_FRAME_READ_STATUS_1_OFFSET (0x4C)/* mjpeg_UV_frame_read_status_1 */
#define MJPEG_UV_FRAME_READ_STATUS_2_OFFSET (0x50)/* mjpeg_UV_frame_read_status_2 */
#define MJPEG_UV_FRAME_WRITE_STATUS_OFFSET (0x54)/* mjpeg_UV_frame_write_status */
#define MJPEG_FRAME_W_HBLK_STATUS_OFFSET (0x58)/* mjpeg_frame_w_hblk_status */
#define MJPEG_START_ADDR0_OFFSET (0x80)/* mjpeg_start_addr0 */
#define MJPEG_BIT_CNT0_OFFSET (0x84)/* mjpeg_bit_cnt0 */
#define MJPEG_START_ADDR1_OFFSET (0x88)/* mjpeg_start_addr1 */
#define MJPEG_BIT_CNT1_OFFSET (0x8C)/* mjpeg_bit_cnt1 */
#define MJPEG_START_ADDR2_OFFSET (0x90)/* mjpeg_start_addr2 */
#define MJPEG_BIT_CNT2_OFFSET (0x94)/* mjpeg_bit_cnt2 */
#define MJPEG_START_ADDR3_OFFSET (0x98)/* mjpeg_start_addr3 */
#define MJPEG_BIT_CNT3_OFFSET (0x9C)/* mjpeg_bit_cnt3 */
#define MJPEG_Q_ENC_OFFSET (0x100)/* mjpeg_q_enc */
#define MJPEG_FRAME_ID_10_OFFSET (0x110)/* mjpeg_frame_id_10 */
#define MJPEG_FRAME_ID_32_OFFSET (0x114)/* mjpeg_frame_id_32 */
#define MJPEG_DEBUG_OFFSET (0x1F0)/* mjpeg_debug */
#define MJPEG_DUMMY_REG_OFFSET (0x1FC)/* mjpeg_dummy_reg */
/* Register Bitfield definitions *****************************************************/
/* 0x0 : mjpeg_control_1 */
#define MJPEG_REG_MJPEG_ENABLE (1<<0U)
#define MJPEG_REG_MJPEG_BIT_ORDER (1<<1U)
#define MJPEG_REG_ORDER_U_EVEN (1<<2U)
#define MJPEG_REG_HW_MODE_SWEN (1<<3U)
#define MJPEG_REG_LAST_HF_WBLK_DMY (1<<4U)
#define MJPEG_REG_LAST_HF_HBLK_DMY (1<<5U)
#define MJPEG_REG_REFLECT_DMY (1<<6U)
#define MJPEG_REG_READ_FWRAP (1<<7U)
#define MJPEG_REG_W_XLEN_SHIFT (8U)
#define MJPEG_REG_W_XLEN_MASK (0x7<