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

Heap-free console formatting for camera livestream diagnostics. More...

#include <stddef.h>
#include <stdint.h>
#include "c6_camera_server.h"
#include "ra8_board_ek_ra8d2.h"
Include dependency graph for c6_cam_console.c:

Go to the source code of this file.

Enumerations

enum  c6_cam_console_t : uint32_t {
  k_c6_cam_console_text_max = 512U ,
  k_c6_cam_decimal_digits = 10U ,
  k_c6_cam_ipv4_high_shift = 24U ,
  k_c6_cam_ipv4_octet_mask = 0xFFU
}
 Bounded formatting sizes and IPv4 extraction constants. More...

Functions

void c6_cam_puts (const char *text)
 Write a bounded NUL-terminated string to SCI8.
void c6_cam_put_u32 (uint32_t value)
 Write one unsigned decimal value to SCI8.
void c6_cam_put_ip (uint32_t ip)
 Write one IPv4 address to SCI8.

Detailed Description

Heap-free console formatting for camera livestream diagnostics.

Implements bounded string, integer, and IPv4 output through the EK-RA8D2 UART console without allocating temporary storage.

Tag
[Ring 6 / APP] {World: S}

Provides bounded decimal, IPv4, and string formatting directly to SCI8 using fixed-size stack buffers and no heap allocation.

Since
0.1.0

Definition in file c6_cam_console.c.

Enumeration Type Documentation

◆ c6_cam_console_t

enum c6_cam_console_t : uint32_t

Bounded formatting sizes and IPv4 extraction constants.

Enumerator
k_c6_cam_console_text_max 

Bounded console string length.

k_c6_cam_decimal_digits 

Digits in a 32-bit decimal rendering.

k_c6_cam_ipv4_high_shift 

Shift of the first IPv4 octet.

k_c6_cam_ipv4_octet_mask 

Mask selecting one IPv4 octet.

Definition at line 25 of file c6_cam_console.c.

Function Documentation

◆ c6_cam_put_ip()

void c6_cam_put_ip ( uint32_t ip)

Write one IPv4 address to SCI8.

Formats the network-order address as four dotted decimal octets.

Parameters
[in]ipIPv4 address in the representation used by the C6/NetX path.
Precondition
The board console is initialized.
The address value came from a C6 or NetX network structure.
Postcondition
Four decimal octets and three separators are queued.
The address value remains unchanged.
Note
This helper emits no trailing whitespace or newline.
Since
0.1.0

Definition at line 60 of file c6_cam_console.c.

References c6_cam_put_u32(), c6_cam_puts(), k_c6_cam_ipv4_high_shift, and k_c6_cam_ipv4_octet_mask.

Referenced by internal_c6_cam_worker_entry().

◆ c6_cam_put_u32()

void c6_cam_put_u32 ( uint32_t value)

Write one unsigned decimal value to SCI8.

Formats the value into fixed stack storage without libc allocation.

Parameters
[in]valueValue to emit.
Precondition
The board console is initialized.
Fixed helper stack storage is available.
Postcondition
The decimal representation is queued for transmission.
No application state except console output is modified.
Note
The full uint32_t range is supported.
Since
0.1.0

Definition at line 44 of file c6_cam_console.c.

References k_c6_cam_decimal_digits, and ra8_board_uart_console_write().

Referenced by c6_cam_camera_report_last_error(), c6_cam_put_ip(), internal_c6_cam_associate(), internal_c6_cam_http_audio(), internal_c6_cam_http_frame(), internal_c6_cam_http_stream(), internal_c6_cam_prepare_camera(), internal_c6_cam_prepare_link(), internal_report_capture_events(), internal_report_jpeg_status_detail(), internal_report_sccb_state(), and sensor_report_register().

◆ c6_cam_puts()

void c6_cam_puts ( const char * text)

Write a bounded NUL-terminated string to SCI8.

Measures at most the helper's fixed string bound before one board-console write.

Parameters
[in]textNUL-terminated text to emit.
Precondition
text is nonnull and terminated within the fixed bound.
The board console is initialized.
Postcondition
The bounded text bytes are queued for transmission.
Caller-owned text remains unchanged.
Note
Console write failures are intentionally ignored by this diagnostic helper.
Since
0.1.0

Definition at line 32 of file c6_cam_console.c.

References k_c6_cam_console_text_max, and ra8_board_uart_console_write().

Referenced by c6_cam_app_run(), c6_cam_camera_report_last_error(), c6_cam_http_serve(), c6_cam_put_ip(), internal_c6_cam_associate(), internal_c6_cam_http_audio(), internal_c6_cam_http_frame(), internal_c6_cam_http_stream(), internal_c6_cam_join(), internal_c6_cam_prepare_camera(), internal_c6_cam_prepare_link(), internal_c6_cam_prepare_media(), internal_c6_cam_report_fault(), internal_c6_cam_setup_or_halt(), internal_c6_cam_worker_entry(), internal_report_capture_events(), internal_report_jpeg_status_detail(), internal_report_sccb_state(), sensor_report_register(), and tx_application_define().