ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_ceu_types.h File Reference

Capture Engine Unit (CEU) configuration descriptors and types. More...

#include <stdint.h>
#include "ra8_ceu_regs.h"
#include "ra8_err.h"
Include dependency graph for ra8_ceu_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ra8_ceu_byte_swap_t
 CDOCR.COBS / COWS / COLS byte-swap control bundle. More...
struct  ra8_ceu_edge_info_t
 CAMCR.DSEL / HDSEL / VDSEL / FLDSEL latch-edge bundle. More...
struct  ra8_ceu_scale_t
 CFLCR scale-down + CFSZR clip-size programming bundle. More...
struct  ra8_ceu_config_t
 Full configuration descriptor for ra8_ceu_init. More...
struct  ra8_ceu_status_t
 Snapshot of the CEU live-status registers. More...
struct  ra8_ceu_buffers_t
 Address bundle programmed into the CDAYR / CDACR family. More...

Typedefs

typedef void(* ra8_ceu_event_fn_t) (void *ctx, uint32_t event_mask)
 Callback fired by ra8_ceu_dispatch for every CETCR event.

Enumerations

enum  ra8_ceu_capture_format_t : uint8_t {
  k_ra8_ceu_fmt_image_capture = 0U ,
  k_ra8_ceu_fmt_data_synchronous = 1U ,
  k_ra8_ceu_fmt_data_enable = 2U
}
 CAMCR.JPG capture-format select. More...
enum  ra8_ceu_capture_mode_t : uint8_t {
  k_ra8_ceu_capture_single = 0U ,
  k_ra8_ceu_capture_continuous = 1U
}
 CAPCR.CTNCP single-shot vs continuous capture. More...
enum  ra8_ceu_data_bus_t : uint8_t {
  k_ra8_ceu_bus_8_bit = 0U ,
  k_ra8_ceu_bus_16_bit = 1U
}
 CAMCR.DTIF data-bus width select. More...
enum  ra8_ceu_polarity_t : uint8_t {
  k_ra8_ceu_pol_high_active = 0U ,
  k_ra8_ceu_pol_low_active = 1U
}
 CAMCR.HDPOL / VDPOL / FLDPOL polarity select. More...
enum  ra8_ceu_edge_t : uint8_t {
  k_ra8_ceu_edge_rising = 0U ,
  k_ra8_ceu_edge_falling = 1U
}
 CAMCR.DSEL / HDSEL / VDSEL / FLDSEL latch-edge select. More...
enum  ra8_ceu_input_order_t : uint8_t {
  k_ra8_ceu_input_cb0_y0_cr0_y1 = 0U ,
  k_ra8_ceu_input_cr0_y0_cb0_y1 = 1U ,
  k_ra8_ceu_input_y0_cb0_y1_cr0 = 2U ,
  k_ra8_ceu_input_y0_cr0_y1_cb0 = 3U
}
 CAMCR.DTARY image-capture input-byte order. More...
enum  ra8_ceu_output_format_t : uint8_t {
  k_ra8_ceu_output_ycbcr_420 = 0U ,
  k_ra8_ceu_output_ycbcr_422 = 1U
}
 CDOCR.CDS output-format select. More...
enum  ra8_ceu_burst_mode_t : uint8_t {
  k_ra8_ceu_burst_32 = 0U ,
  k_ra8_ceu_burst_64 = 1U ,
  k_ra8_ceu_burst_128 = 2U ,
  k_ra8_ceu_burst_256 = 3U
}
 CAPCR.MTCM[1:0] bus-burst transfer size. More...
enum  ra8_ceu_field_select_t : uint8_t {
  k_ra8_ceu_field_immediate = 0U ,
  k_ra8_ceu_field_top = 1U ,
  k_ra8_ceu_field_bottom = 2U
}
 CAIFR.FCI – first captured field for interlace input. More...
enum  ra8_ceu_interlace_t : uint8_t {
  k_ra8_ceu_progressive = 0U ,
  k_ra8_ceu_interlace = 1U
}
 CAIFR.IFS – progressive vs interlace input. More...
enum  ra8_ceu_fields_capture_t : uint8_t {
  k_ra8_ceu_fields_both = 0U ,
  k_ra8_ceu_fields_one = 1U
}
 CAIFR.CIM – both fields vs single field of an interlace pair. More...
enum  ra8_ceu_plane_t : uint8_t {
  k_ra8_ceu_plane_a = 0U ,
  k_ra8_ceu_plane_b = 1U
}
 CRCNTR plane-A / plane-B selector. More...

Detailed Description

Capture Engine Unit (CEU) configuration descriptors and types.

Tag
[Ring 3 / HAL] {World: NS}

Type definitions for the RA8D2 Capture Engine Unit (CEU) HAL driver: the typed enums, register-bundle structs, the full ra8_ceu_config_t open-time descriptor, the live-status snapshot struct, the address-bundle struct, and the event-callback typedef. The function prototypes that consume these types live in ra8_ceu_api.h; both are aggregated by the thin umbrella ra8_ceu.h. See that umbrella for the full driver overview and state machine.

Since
0.1.0

Definition in file ra8_ceu_types.h.

Typedef Documentation

◆ ra8_ceu_event_fn_t

typedef void(* ra8_ceu_event_fn_t) (void *ctx, uint32_t event_mask)

Callback fired by ra8_ceu_dispatch for every CETCR event.

Parameters
[in]ctxCaller-supplied context pointer.
[in]event_maskSnapshot of CETCR at dispatch time, masked by the currently enabled CEIER bits.

Definition at line 343 of file ra8_ceu_types.h.

Enumeration Type Documentation

◆ ra8_ceu_burst_mode_t

enum ra8_ceu_burst_mode_t : uint8_t

CAPCR.MTCM[1:0] bus-burst transfer size.

HUM Ch 60.2.2 "CAPCR" p 3634-3635. Larger bursts give higher peak throughput but block the bus longer; pick to match the downstream RAM contention budget.

Enumerator
k_ra8_ceu_burst_32 

32-byte bus bursts.

k_ra8_ceu_burst_64 

64-byte bus bursts.

k_ra8_ceu_burst_128 

128-byte bus bursts.

k_ra8_ceu_burst_256 

256-byte bus bursts.

Definition at line 138 of file ra8_ceu_types.h.

◆ ra8_ceu_capture_format_t

enum ra8_ceu_capture_format_t : uint8_t

CAMCR.JPG capture-format select.

Mirrors FSP ceu_capture_format_t and HUM Ch 60.2.3 "CAMCR" (p 3636-3641) JPG[1:0] field. Determines which Y/C separator and which fetch state-machine the CEU runs:

  • image_capture – YCbCr 4:2:2 input split into separate luminance / chrominance buffers (CDAYR / CDACR).
  • data_synchronous – the sensor lines are sampled directly on HD/VD timing into a single linear buffer (CDAYR only).
  • data_enable – byte-stream capture gated by an external DEN-style signal (JPEG payload mode); firewall and CDSSR are active.
Enumerator
k_ra8_ceu_fmt_image_capture 

YCbCr image capture mode.

k_ra8_ceu_fmt_data_synchronous 

Raw synchronous data fetch.

k_ra8_ceu_fmt_data_enable 

JPEG / data-enable fetch.

Definition at line 54 of file ra8_ceu_types.h.

◆ ra8_ceu_capture_mode_t

enum ra8_ceu_capture_mode_t : uint8_t

CAPCR.CTNCP single-shot vs continuous capture.

HUM Ch 60.2.2 "CAPCR" p 3634-3635 – continuous mode is only legal in image-capture format.

Enumerator
k_ra8_ceu_capture_single 

CE auto-clears after CPE.

k_ra8_ceu_capture_continuous 

CE stays asserted across frames.

Definition at line 68 of file ra8_ceu_types.h.

◆ ra8_ceu_data_bus_t

enum ra8_ceu_data_bus_t : uint8_t

CAMCR.DTIF data-bus width select.

Enumerator
k_ra8_ceu_bus_8_bit 

VIO_D[7:0] used.

k_ra8_ceu_bus_16_bit 

VIO_D[15:0] used.

Definition at line 77 of file ra8_ceu_types.h.

◆ ra8_ceu_edge_t

enum ra8_ceu_edge_t : uint8_t

CAMCR.DSEL / HDSEL / VDSEL / FLDSEL latch-edge select.

Enumerator
k_ra8_ceu_edge_rising 

Sample on rising VIO_CLK edge.

k_ra8_ceu_edge_falling 

Sample on falling VIO_CLK edge.

Definition at line 95 of file ra8_ceu_types.h.

◆ ra8_ceu_field_select_t

enum ra8_ceu_field_select_t : uint8_t

CAIFR.FCI – first captured field for interlace input.

HUM Ch 60.2.7 "CAIFR" p 3647.

Enumerator
k_ra8_ceu_field_immediate 

Capture starts at next VD.

k_ra8_ceu_field_top 

Wait for top field.

k_ra8_ceu_field_bottom 

Wait for bottom field.

Definition at line 152 of file ra8_ceu_types.h.

◆ ra8_ceu_fields_capture_t

enum ra8_ceu_fields_capture_t : uint8_t

CAIFR.CIM – both fields vs single field of an interlace pair.

HUM Ch 60.2.7 "CAIFR" p 3647. Only meaningful when IFS = 1.

Enumerator
k_ra8_ceu_fields_both 

Capture top + bottom fields.

k_ra8_ceu_fields_one 

Capture only the FCI-selected field.

Definition at line 177 of file ra8_ceu_types.h.

◆ ra8_ceu_input_order_t

enum ra8_ceu_input_order_t : uint8_t

CAMCR.DTARY image-capture input-byte order.

HUM Ch 60.2.3 p 3636-3641. Only meaningful when capture_format is image_capture. Selects which 4-byte rotation of the YCbCr 4:2:2 stream the CEU expects on the parallel bus.

Enumerator
k_ra8_ceu_input_cb0_y0_cr0_y1 

Cb0 Y0 Cr0 Y1.

k_ra8_ceu_input_cr0_y0_cb0_y1 

Cr0 Y0 Cb0 Y1.

k_ra8_ceu_input_y0_cb0_y1_cr0 

Y0 Cb0 Y1 Cr0.

k_ra8_ceu_input_y0_cr0_y1_cb0 

Y0 Cr0 Y1 Cb0.

Definition at line 109 of file ra8_ceu_types.h.

◆ ra8_ceu_interlace_t

enum ra8_ceu_interlace_t : uint8_t

CAIFR.IFS – progressive vs interlace input.

HUM Ch 60.2.7 "CAIFR" p 3647.

Enumerator
k_ra8_ceu_progressive 

Single-field-per-frame stream.

k_ra8_ceu_interlace 

Top + bottom field stream.

Definition at line 165 of file ra8_ceu_types.h.

◆ ra8_ceu_output_format_t

enum ra8_ceu_output_format_t : uint8_t

CDOCR.CDS output-format select.

HUM Ch 60.2.20 p 3662-3663. Only meaningful in image-capture mode; data-fetch modes must use 4:2:2 (CDS = 1).

Enumerator
k_ra8_ceu_output_ycbcr_420 

4:2:2 in -> 4:2:0 in memory.

k_ra8_ceu_output_ycbcr_422 

Pass-through (no conversion).

Definition at line 124 of file ra8_ceu_types.h.

◆ ra8_ceu_plane_t

enum ra8_ceu_plane_t : uint8_t

CRCNTR plane-A / plane-B selector.

HUM Ch 60.2.8 "CRCNTR" p 3649. Plane B is the shadow programming window; setting CRCNTR.RVS makes the CEU swap planes on the next VD edge so a new geometry / address set takes effect cleanly.

Enumerator
k_ra8_ceu_plane_a 

Use Plane A registers (default).

k_ra8_ceu_plane_b 

Use Plane B (shadow) registers.

Definition at line 191 of file ra8_ceu_types.h.

◆ ra8_ceu_polarity_t

enum ra8_ceu_polarity_t : uint8_t

CAMCR.HDPOL / VDPOL / FLDPOL polarity select.

Enumerator
k_ra8_ceu_pol_high_active 

Sync signal is active high.

k_ra8_ceu_pol_low_active 

Sync signal is active low.

Definition at line 86 of file ra8_ceu_types.h.