ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_fs_utf_internal.h
Go to the documentation of this file.
1
61
62#pragma once
63
64#include <stdint.h>
65
66#include "ra8_attributes.h"
67#include "ra8_err.h"
68
121
157ra8_err_t priv_utf8_to_utf16(const char* in, uint16_t* out, uint32_t cap, uint32_t* out_units);
158
194ra8_err_t priv_utf16_to_utf8(const uint16_t* in, uint32_t units, char* out, uint32_t cap);
195
228uint8_t priv_utf16_ieq(const uint16_t* a, uint32_t an, const uint16_t* b, uint32_t bn);
229
255uint8_t priv_utf16_all_ascii(const uint16_t* in, uint32_t units);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
uint8_t priv_utf16_ieq(const uint16_t *a, uint32_t an, const uint16_t *b, uint32_t bn)
Compare two UTF-16 names for case-insensitive equality.
Definition ra8_fs_utf.c:529
uint8_t priv_utf16_all_ascii(const uint16_t *in, uint32_t units)
Is every unit of in inside the ASCII range?
Definition ra8_fs_utf.c:543
ra8_err_t priv_utf8_to_utf16(const char *in, uint16_t *out, uint32_t cap, uint32_t *out_units)
Convert a NUL-terminated UTF-8 name into UTF-16LE code units.
Definition ra8_fs_utf.c:283
ra8_fs_utf_t
Bit patterns, thresholds and shifts of the UTF-8 / UTF-16 encodings.
@ k_utf_min_4byte
Smallest code point a 4-byte form may hold.
@ k_utf_lead3_tag
Tag of a three-byte lead byte.
@ k_utf_cont_shift
Payload width of one continuation byte.
@ k_utf_sur_shift
Payload width of one surrogate unit.
@ k_utf_code_max
Largest code point Unicode defines.
@ k_utf_len_1
Sequence length: plain ASCII.
@ k_utf_lead3_mask
Mask isolating a three-byte lead's tag.
@ k_utf_len_3
Sequence length: three bytes.
@ k_utf_sur_hi_first
First high (leading) surrogate unit.
@ k_utf_lead4_payload
Payload bits in a four-byte lead.
@ k_utf_lead2_payload
Payload bits in a two-byte lead.
@ k_utf_cont_tag
Tag every continuation byte carries.
@ k_utf_len_2
Sequence length: two bytes.
@ k_utf_lead4_tag
Tag of a four-byte lead byte.
@ k_utf_min_2byte
Smallest code point a 2-byte form may hold.
@ k_utf_lead4_mask
Mask isolating a four-byte lead's tag.
@ k_utf_sur_mask
Payload bits in one surrogate unit.
@ k_utf_cont_payload
Payload bits in a continuation byte.
@ k_utf_sur_lo_first
First low (trailing) surrogate unit.
@ k_utf_lead2_mask
Mask isolating a two-byte lead's tag.
@ k_utf_lead3_payload
Payload bits in a three-byte lead.
@ k_utf_ascii_max
Highest code point that is one UTF-8 byte.
@ k_utf_lead2_tag
Tag of a two-byte lead byte.
@ k_utf_sur_last
Last surrogate unit of either half.
@ k_utf_len_4
Sequence length: four bytes.
@ k_utf_byte_mask
Mask isolating a unit's low byte.
@ k_utf_cont_mask
Mask isolating a continuation byte's tag.
@ k_utf_min_3byte
Smallest code point a 3-byte form may hold.
@ k_utf_unit_max
Largest UTF-16 code unit.
@ k_utf8_max_per_unit
Worst-case UTF-8 bytes per UTF-16 unit.
@ k_utf_byte_shift
Shift bringing a unit's high byte down.
ra8_err_t priv_utf16_to_utf8(const uint16_t *in, uint32_t units, char *out, uint32_t cap)
Convert UTF-16LE code units into a NUL-terminated UTF-8 name.
Definition ra8_fs_utf.c:499