|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Camera initialization and VGA UYVY to QVGA JPEG frame production. More...
#include <stdint.h>#include "c6_camera_server.h"#include "ra8_attributes.h"#include "ra8_board_ek_ra8d2.h"#include "ra8_camera.h"#include "ra8_camera_codec_jpeg_sw.h"#include "ra8_camera_source_ceu.h"#include "ra8_ceu.h"#include "ra8_ov5640.h"#include "ra8_time.h"Go to the source code of this file.
Enumerations | |
| enum | sw_cam_cfg_t : uint32_t { k_sw_cam_source_width = 640U , k_sw_cam_source_height = 480U , k_sw_cam_source_stride = k_sw_cam_source_width * 2U , k_sw_cam_source_bytes = k_sw_cam_source_stride * k_sw_cam_source_height , k_sw_cam_stream_width = 320U , k_sw_cam_stream_height = 240U , k_sw_cam_rgb_bytes = k_sw_cam_stream_width * k_sw_cam_stream_height * 3U , k_sw_cam_jpeg_bytes = k_sw_cam_rgb_bytes , k_sw_cam_jpeg_quality = 65U , k_sw_cam_xclk_hz = 24000000U , k_sw_cam_mode_settle_ms = 100U , k_sw_cam_poll_ms = 5U , k_sw_cam_poll_attempts = 800U } |
| Software-camera backend geometry, buffers, and sensor timing. More... | |
Functions | |
| static ra8_err_t | internal_c6_cam_sensor_bind (void) |
| Bind the software-JPEG sensor instance to board SCCB callbacks. | |
| static ra8_camera_source_ceu_cfg_t | internal_c6_cam_source_config (void) |
| Build the CEU configuration for packed VGA capture. | |
| ra8_err_t | c6_cam_camera_init (void) |
| Camera image and board-switch initialization, then one CEU capture. | |
| ra8_err_t | c6_cam_camera_capture_jpeg (const uint8_t **out_jpeg, uint32_t *out_bytes, c6_cam_frame_timing_t *out_timing) |
| const char * | c6_cam_camera_description (void) |
| Human-readable description of the selected camera backend. | |
| void | c6_cam_camera_report_last_error (void) |
| Emit backend-specific diagnostics for the last capture failure. | |
Variables | |
| static uint8_t | s_capture [k_sw_cam_source_bytes] |
| Caller-selected SDRAM buffers for capture, conversion, and JPEG. | |
| static uint8_t | s_rgb [k_sw_cam_rgb_bytes] |
| static uint8_t | s_jpeg [k_sw_cam_jpeg_bytes] |
| static ra8_ov5640_t | s_camera_sensor |
| Transport-independent OV5640 instance bound to the EK-RA8D2 SCCB bus. | |
| static ra8_camera_source_t | s_source |
| static ra8_camera_source_ceu_state_t | s_source_state |
| static ra8_camera_codec_t | s_codec |
| static ra8_camera_codec_jpeg_sw_state_t | s_codec_state |
Camera initialization and VGA UYVY to QVGA JPEG frame production.
The CEU keeps the bench-proven 640x480 packed UYVY configuration. Each browser request captures a complete frame, downsamples by two in both axes while converting BT.601 YCbCr to RGB888, then uses the repository's baseline software JPEG encoder. The CEU, RGB and JPEG buffers live in external SDRAM so the NetX working set fits in internal SRAM.
Definition in file c6_cam_camera.c.
| enum sw_cam_cfg_t : uint32_t |
Software-camera backend geometry, buffers, and sensor timing.
Definition at line 32 of file c6_cam_camera.c.
|
nodiscard |
Definition at line 196 of file c6_cam_camera.c.
|
nodiscard |
Human-readable description of the selected camera backend.
Definition at line 234 of file c6_cam_camera.c.
|
nodiscard |
Camera image and board-switch initialization, then one CEU capture.
Definition at line 149 of file c6_cam_camera.c.
| void c6_cam_camera_report_last_error | ( | void | ) |
Emit backend-specific diagnostics for the last capture failure.
Writes retained sensor or CEU status through the shared bounded console helpers.
Definition at line 239 of file c6_cam_camera.c.
|
static |
Bind the software-JPEG sensor instance to board SCCB callbacks.
Constructs the transport used by the reusable OV5640 driver.
| k_ra8_ok | The sensor instance was initialized. |
| k_ra8_err_null_ptr | A required transport dependency was absent. |
Definition at line 85 of file c6_cam_camera.c.
References ra8_board_camera_delay_ms(), ra8_board_camera_sccb_read_reg(), ra8_board_camera_sccb_write_reg(), RA8_INTERNAL, ra8_ov5640_init(), and s_camera_sensor.
Referenced by c6_cam_camera_init().
|
static |
Build the CEU configuration for packed VGA capture.
Selects one-shot synchronous UYVY output into the static source buffer.
| ra8_camera_source_ceu_cfg_t | Complete packed-camera source configuration. |
Definition at line 108 of file c6_cam_camera.c.
References k_ra8_camera_format_uyvy422, k_ra8_ceu_burst_32, k_ra8_ceu_bus_8_bit, k_ra8_ceu_capture_single, k_ra8_ceu_edge_rising, k_ra8_ceu_field_immediate, k_ra8_ceu_fmt_data_synchronous, k_ra8_ceu_input_cb0_y0_cr0_y1, k_ra8_ceu_output_ycbcr_422, k_ra8_ceu_pol_high_active, k_sw_cam_poll_attempts, k_sw_cam_poll_ms, k_sw_cam_source_bytes, k_sw_cam_source_height, k_sw_cam_source_stride, k_sw_cam_source_width, and RA8_INTERNAL.
Referenced by c6_cam_camera_init().
|
static |
Transport-independent OV5640 instance bound to the EK-RA8D2 SCCB bus.
Definition at line 66 of file c6_cam_camera.c.
Referenced by c6_cam_camera_init(), cam_prepare_capture(), cam_run(), cam_sensor_bind(), and internal_c6_cam_sensor_bind().
|
static |
Caller-selected SDRAM buffers for capture, conversion, and JPEG.
Definition at line 62 of file c6_cam_camera.c.
|
static |
Definition at line 69 of file c6_cam_camera.c.
Referenced by c6_cam_camera_capture_jpeg(), c6_cam_camera_init(), and internal_bring_up_capture_pipeline().
|
static |
Definition at line 70 of file c6_cam_camera.c.
Referenced by c6_cam_camera_init().
|
static |
Definition at line 64 of file c6_cam_camera.c.
Referenced by c6_cam_camera_capture_jpeg().
|
static |
Definition at line 63 of file c6_cam_camera.c.
Referenced by c6_cam_camera_init().
|
static |
Definition at line 67 of file c6_cam_camera.c.
|
static |
Definition at line 68 of file c6_cam_camera.c.
Referenced by c6_cam_camera_init(), c6_cam_camera_report_last_error(), internal_bring_up_capture_pipeline(), and internal_report_capture_events().