use crate::metadata::ir::*;
pub(crate) static REGISTERS: IR = IR {
blocks: &[Block {
name: "Dvp",
extends: None,
description: Some("Digital Video Port."),
items: &[
BlockItem {
name: "cr0",
description: Some("Digital Video control register. (DVP_CR0)."),
array: None,
byte_offset: 0x0,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 8,
fieldset: Some("Cr0"),
}),
},
BlockItem {
name: "cr1",
description: Some("Digital Video control register. (DVP_CR1)."),
array: None,
byte_offset: 0x1,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 8,
fieldset: Some("Cr1"),
}),
},
BlockItem {
name: "ier",
description: Some("Digital Video Interrupt register. (DVP_IER)."),
array: None,
byte_offset: 0x2,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 8,
fieldset: Some("Ier"),
}),
},
BlockItem {
name: "row_num",
description: Some("Image line count configuration register. (DVP_ROW_NUM)."),
array: None,
byte_offset: 0x4,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("RowNum"),
}),
},
BlockItem {
name: "col_num",
description: Some("Image column number configuration register. (DVP_COL_NUM)."),
array: None,
byte_offset: 0x6,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("ColNum"),
}),
},
BlockItem {
name: "dma_buf0",
description: Some("Digital Video DMA address register. (DVP_DMA_BUF0)."),
array: None,
byte_offset: 0x8,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 32,
fieldset: Some("DmaBuf0"),
}),
},
BlockItem {
name: "dma_buf1",
description: Some("Digital Video DMA address register. (DVP_DMA_BUF1)."),
array: None,
byte_offset: 0xc,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 32,
fieldset: Some("DmaBuf1"),
}),
},
BlockItem {
name: "ifr",
description: Some("Digital Video Flag register. (DVP_IFR)."),
array: None,
byte_offset: 0x10,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 8,
fieldset: Some("Ifr"),
}),
},
BlockItem {
name: "status",
description: Some("Digital Video STATUS register. (DVP_STATUS)."),
array: None,
byte_offset: 0x11,
inner: BlockItemInner::Register(Register {
access: Access::Read,
bit_size: 8,
fieldset: Some("Status"),
}),
},
BlockItem {
name: "row_cnt",
description: Some("Digital Video line counter register. (DVP_ROW_CNT)."),
array: None,
byte_offset: 0x14,
inner: BlockItemInner::Register(Register {
access: Access::Read,
bit_size: 16,
fieldset: Some("RowCnt"),
}),
},
BlockItem {
name: "hoffcnt",
description: Some("Digital Video horizontal displacement register. (DVP_HOFFCNT)."),
array: None,
byte_offset: 0x18,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("Hoffcnt"),
}),
},
BlockItem {
name: "vst",
description: Some("Digital Video line number register. (DVP_VST)."),
array: None,
byte_offset: 0x1a,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("Vst"),
}),
},
BlockItem {
name: "capcnt",
description: Some("Digital Video Capture count register. (DVP_CAPCNT)."),
array: None,
byte_offset: 0x1c,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("Capcnt"),
}),
},
BlockItem {
name: "vline",
description: Some("Digital Video Vertical line count register. (DVP_VLINE)."),
array: None,
byte_offset: 0x1e,
inner: BlockItemInner::Register(Register {
access: Access::ReadWrite,
bit_size: 16,
fieldset: Some("Vline"),
}),
},
BlockItem {
name: "dr",
description: Some("Digital Video Data register. (DVP_DR)."),
array: None,
byte_offset: 0x20,
inner: BlockItemInner::Register(Register {
access: Access::Read,
bit_size: 32,
fieldset: Some("Dr"),
}),
},
],
}],
fieldsets: &[
FieldSet {
name: "Capcnt",
extends: None,
description: Some("Digital Video Capture count register. (DVP_CAPCNT)."),
bit_size: 16,
fields: &[Field {
name: "capcnt",
description: Some("Number of PCLK cycles captured by clipping window."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "ColNum",
extends: None,
description: Some("Image column number configuration register. (DVP_COL_NUM)."),
bit_size: 16,
fields: &[Field {
name: "col_num",
description: Some("Number of PCLK cycles for row data."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Cr0",
extends: None,
description: Some("Digital Video control register. (DVP_CR0)."),
bit_size: 8,
fields: &[
Field {
name: "enable",
description: Some("DVP enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "v_polar",
description: Some("DVP VSYNC polarity control."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
bit_size: 1,
array: None,
enumm: Some("VsyncPolarity"),
},
Field {
name: "h_polar",
description: Some("DVP HSYNC polarity control."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
bit_size: 1,
array: None,
enumm: Some("HsyncPolarity"),
},
Field {
name: "p_polar",
description: Some("DVP PCLK polarity control."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
bit_size: 1,
array: None,
enumm: Some("PclkPolarity"),
},
Field {
name: "msk_dat_mod",
description: Some("DVP data mode."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
bit_size: 2,
array: None,
enumm: Some("DataMode"),
},
Field {
name: "jpeg",
description: Some("DVP JPEG mode."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 6 }),
bit_size: 1,
array: None,
enumm: Some("CaptureMode"),
},
],
},
FieldSet {
name: "Cr1",
extends: None,
description: Some("Digital Video control register. (DVP_CR1)."),
bit_size: 8,
fields: &[
Field {
name: "dma_en",
description: Some("DVP dma enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "all_clr",
description: Some("DVP all clear."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "rcv_clr",
description: Some("DVP receive logic clear."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "buf_tog",
description: Some("DVP bug toggle by software."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "cm",
description: Some("DVP capture mode."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "crop",
description: Some("DVP Crop feature enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 5 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "fcrc",
description: Some("DVP frame capture rate control."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 6 }),
bit_size: 2,
array: None,
enumm: Some("CaptureRate"),
},
],
},
FieldSet {
name: "DmaBuf0",
extends: None,
description: Some("Digital Video DMA address register. (DVP_DMA_BUF0)."),
bit_size: 32,
fields: &[Field {
name: "dma_buf0",
description: Some("DMA receive address 0."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 17,
array: None,
enumm: None,
}],
},
FieldSet {
name: "DmaBuf1",
extends: None,
description: Some("Digital Video DMA address register. (DVP_DMA_BUF1)."),
bit_size: 32,
fields: &[Field {
name: "dma_buf1",
description: Some("DMA receive address 1."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 17,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Dr",
extends: None,
description: Some("Digital Video Data register. (DVP_DR)."),
bit_size: 32,
fields: &[Field {
name: "dr",
description: Some("Prevent DMA overflow."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 32,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Hoffcnt",
extends: None,
description: Some("Digital Video horizontal displacement register. (DVP_HOFFCNT)."),
bit_size: 16,
fields: &[Field {
name: "hoffcnt",
description: Some("Number of PCLK cycles for row data."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Ier",
extends: None,
description: Some("Digital Video Interrupt register. (DVP_IER)."),
bit_size: 8,
fields: &[
Field {
name: "ie_str_frm",
description: Some("DVP frame start interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "ie_row_done",
description: Some("DVP row received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "ie_frm_done",
description: Some("DVP frame received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "ie_fifo_ov",
description: Some("DVP receive fifo overflow interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "ie_stp_frm",
description: Some("DVP frame stop interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
bit_size: 1,
array: None,
enumm: None,
},
],
},
FieldSet {
name: "Ifr",
extends: None,
description: Some("Digital Video Flag register. (DVP_IFR)."),
bit_size: 8,
fields: &[
Field {
name: "if_str_frm",
description: Some("DVP frame start interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "if_row_done",
description: Some("DVP row received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "if_frm_done",
description: Some("DVP frame received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "if_fifo_ov",
description: Some("DVP receive fifo overflow interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "if_stp_frm",
description: Some("DVP frame stop interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
bit_size: 1,
array: None,
enumm: None,
},
],
},
FieldSet {
name: "RowCnt",
extends: None,
description: Some("Digital Video line counter register. (DVP_ROW_CNT)."),
bit_size: 16,
fields: &[Field {
name: "row_cnt",
description: Some("The number of rows of frame image data."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "RowNum",
extends: None,
description: Some("Image line count configuration register. (DVP_ROW_NUM)."),
bit_size: 16,
fields: &[Field {
name: "row_num",
description: Some("The number of rows of frame image data."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Status",
extends: None,
description: Some("Digital Video STATUS register. (DVP_STATUS)."),
bit_size: 8,
fields: &[
Field {
name: "fifo_rdy",
description: Some("DVP frame start interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "fifo_full",
description: Some("DVP row received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "fifo_ov",
description: Some("DVP frame received done interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
bit_size: 1,
array: None,
enumm: None,
},
Field {
name: "msk_fifo_cnt",
description: Some("DVP receive fifo overflow interrupt enable."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
bit_size: 3,
array: None,
enumm: None,
},
],
},
FieldSet {
name: "Vline",
extends: None,
description: Some("Digital Video Vertical line count register. (DVP_VLINE)."),
bit_size: 16,
fields: &[Field {
name: "vline",
description: Some("Crop the number of rows captured by window."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
FieldSet {
name: "Vst",
extends: None,
description: Some("Digital Video line number register. (DVP_VST)."),
bit_size: 16,
fields: &[Field {
name: "vst",
description: Some("The number of lines captured by the image."),
bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
bit_size: 16,
array: None,
enumm: None,
}],
},
],
enums: &[
Enum {
name: "CaptureMode",
description: Some("Capture mode."),
bit_size: 1,
variants: &[
EnumVariant {
name: "RAW",
description: Some("Raw data capture mode."),
value: 0,
},
EnumVariant {
name: "JPEG",
description: Some("JPEG data capture mode."),
value: 1,
},
],
},
Enum {
name: "CaptureRate",
description: Some("Capture rate"),
bit_size: 2,
variants: &[
EnumVariant {
name: "ALL",
description: Some("Capture all frames."),
value: 0,
},
EnumVariant {
name: "HALF",
description: Some("One frame per Two Captures."),
value: 1,
},
EnumVariant {
name: "QUARTER",
description: Some("One frame per Four Captures."),
value: 2,
},
],
},
Enum {
name: "DataMode",
description: Some("Data mode."),
bit_size: 2,
variants: &[
EnumVariant {
name: "_8BIT",
description: Some("8-bit data mode."),
value: 0,
},
EnumVariant {
name: "_10BIT",
description: Some("10-bit data mode."),
value: 1,
},
EnumVariant {
name: "_12BIT",
description: Some("12-bit data mode."),
value: 2,
},
],
},
Enum {
name: "HsyncPolarity",
description: Some("HSYNC polarity control."),
bit_size: 1,
variants: &[
EnumVariant {
name: "ACTIVE_HIGH",
description: Some("HSYNC active high."),
value: 0,
},
EnumVariant {
name: "ACTIVE_LOW",
description: Some("HSYNC active low."),
value: 1,
},
],
},
Enum {
name: "PclkPolarity",
description: Some("PCLK polarity control."),
bit_size: 1,
variants: &[
EnumVariant {
name: "RISING_EDGE",
description: Some("PCLK rising edge."),
value: 0,
},
EnumVariant {
name: "FALLING_EDGE",
description: Some("PCLK falling edge."),
value: 1,
},
],
},
Enum {
name: "VsyncPolarity",
description: Some("VSYNC polarity control."),
bit_size: 1,
variants: &[
EnumVariant {
name: "ACTIVE_LOW",
description: Some("VSYNC active low."),
value: 0,
},
EnumVariant {
name: "ACTIVE_HIGH",
description: Some("VSYNC active high."),
value: 1,
},
],
},
],
};