ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
usb_msc_mram_steps.h
Go to the documentation of this file.
1
24
25#pragma once
26
27#include <stdint.h>
28
34typedef enum : uint32_t {
40
45typedef enum : uint32_t {
46 k_mram_base_addr = 0x02000000U,
47 k_mram_bytes = 0x00100000U,
49
79
84typedef enum : uint32_t {
85 k_boot_jmp0 = 0xEBU,
86 k_boot_jmp1 = 0x3CU,
87 k_boot_jmp2 = 0x90U,
88 k_boot_media = 0xF8U,
93 k_boot_volume_id = 0x52A8D200U,
94 k_boot_sig_lo = 0x55U,
95 k_boot_sig_hi = 0xAAU,
99
132
137typedef enum : uint32_t {
139 k_word_mask = 0xFFFFU,
141
142#ifndef RA8_OFF_TARGET
143
144#include "ux_api.h"
145
165void demo_fat_fill_sector(uint32_t lba, UCHAR* out);
166
167#endif /* !RA8_OFF_TARGET */
demo_config_t
Compile-time settings for the HTTPS client demo.
Definition main.c:87
@ k_demo_thread_stack
Demo thread stack.
Definition main.c:89
@ k_demo_idle_ticks
Idle back-off when no class active.
Definition main.c:122
@ k_demo_usbx_pool_bytes
USBX pool: 32 KiB; CDC-ACM enum exhausts 16 KiB.
Definition main.c:120
@ k_demo_block_size
SCSI logical block size (bytes).
Definition main.c:123
@ k_dir_off_attr
MS FAT spec sec 6 "DIR_Attr".
@ k_byte_mask
Byte mask.
@ k_word_mask
Word mask.
@ k_boot_sig_hi_off
Signature high-byte offset.
@ k_boot_jmp0
Short JMP opcode.
@ k_boot_num_heads
Geometry filler.
@ k_boot_sig_lo_off
Signature low-byte offset.
@ k_boot_sig_hi
Boot signature high byte.
@ k_boot_jmp1
JMP displacement.
@ k_boot_sig_lo
Boot signature low byte.
@ k_boot_media
Fixed-disk media byte.
@ k_boot_sec_per_trk
Geometry filler.
@ k_boot_ext_sig
Extended boot signature.
@ k_boot_drive_num
BIOS drive number.
@ k_boot_jmp2
NOP.
@ k_boot_volume_id
Arbitrary volume serial.
@ k_word_shift
Bits per half-word.
@ k_fat_root_entries
Root directory entries.
@ k_fat_eoc
End-of-chain marker.
@ k_fat_data_sectors
Padded data region (>= 4085).
@ k_fat_data_lba
First data sector (cluster 2).
@ k_fat_root_sectors
512 entries x 32 B / 512 B.
@ k_fat_root_lba
First root-directory sector.
@ k_fat_fat_sectors
FAT16 size for 4098 entries.
@ k_fat_fat_lba
First FAT sector.
@ k_fat_first_cluster
FAT data area starts at cluster 2.
@ k_fat_entry0
FAT[0]: media F8 + filler.
@ k_fat_reserved_sectors
Boot sector only.
@ k_fat_entries_per_sec
FAT16 entries per 512-byte sector.
@ k_fat_total_sectors
1 + 17 + 32 + 4096.
@ k_fat_last_mram_clus
Last cluster of MRAM.BIN.
@ k_fat_num_fats
Single FAT copy.
@ k_fat_mram_clusters
Clusters backed by MRAM (1 MiB).
@ k_dir_entry_bytes
Directory entry size.
@ k_bpb_off_spt
Sectors per track.
@ k_bpb_off_label
Volume label (11 bytes).
@ k_dir_attr_volume
Volume-label attribute.
@ k_bpb_off_media
Media descriptor.
@ k_bpb_off_bps
Bytes per sector.
@ k_dir_off_size
File size (32-bit LE).
@ k_bpb_off_jmp
Jump instruction.
@ k_bpb_off_heads
Head count.
@ k_bpb_off_oem
OEM name (8 bytes).
@ k_bpb_off_volid
Volume serial (4 bytes).
@ k_bpb_off_bootsig
Extended boot signature.
@ k_bpb_off_fatsz16
Sectors per FAT.
@ k_bpb_off_rsvd
Reserved sector count.
@ k_bpb_off_drvnum
Drive number.
@ k_bpb_off_fstype
Filesystem type (8 bytes).
@ k_bpb_off_rootent
Root entry count.
@ k_dir_name_bytes
8.3 name field length.
@ k_byte_shift
Bits per byte for LE packing.
@ k_dir_off_cluster_lo
First cluster (low word).
@ k_bpb_off_nfats
Number of FATs.
@ k_bpb_off_spc
Sectors per cluster.
@ k_bpb_off_totsec16
Total sectors (16-bit).
@ k_dir_attr_read_only
Read-only attribute.
@ k_mram_bytes
1 MiB window size.
@ k_mram_base_addr
MRAM code window base address.
demo_fat_geom_t
Synthesized FAT16 volume geometry (MS FAT spec 1.03).
demo_mram_t
The MRAM window this volume exposes (RA8D2 HUM memory map).
void demo_fat_fill_sector(uint32_t lba, UCHAR *out)
Synthesize one 512-byte sector of the read-only volume.
demo_word_pack_t
32-bit little-endian split constants.
demo_fat_boot_t
Boot-sector field values (MS FAT spec 1.03 sec 3.1).
demo_fat_off_t
Byte offsets inside the boot sector and directory entries.