From 5cce2f370e369bfec2948b388943205a55fed172 Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 6 Oct 2022 20:30:56 +0200 Subject: [PATCH] Introduce new types --- src/Tools/cdgen/Cargo.toml | 2 ++ src/Tools/cdgen/src/lib.rs | 1 + src/Tools/cdgen/src/types/mod.rs | 30 ++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 src/Tools/cdgen/src/types/mod.rs diff --git a/src/Tools/cdgen/Cargo.toml b/src/Tools/cdgen/Cargo.toml index 0deede59..7f4044fa 100644 --- a/src/Tools/cdgen/Cargo.toml +++ b/src/Tools/cdgen/Cargo.toml @@ -6,3 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +cdtypes = {path = "../cdtypes"} +tool_helper = {path = "../tool_helper"} \ No newline at end of file diff --git a/src/Tools/cdgen/src/lib.rs b/src/Tools/cdgen/src/lib.rs index e69de29b..dd198c6d 100644 --- a/src/Tools/cdgen/src/lib.rs +++ b/src/Tools/cdgen/src/lib.rs @@ -0,0 +1 @@ +pub mod types; \ No newline at end of file diff --git a/src/Tools/cdgen/src/types/mod.rs b/src/Tools/cdgen/src/types/mod.rs new file mode 100644 index 00000000..813eb8bb --- /dev/null +++ b/src/Tools/cdgen/src/types/mod.rs @@ -0,0 +1,30 @@ +use cdtypes::types::cdstring::DString; + +pub struct CDDesc { + root: Directory +} + +pub struct PVD { + +} + +pub struct Directory { + name: DirectoryName, + lba: Option, + length: Option, + data: Vec, + dirs: Vec +} + +pub struct Data { + name: FileName, +} + +pub struct DirectoryName { + name: DString<8>, +} + +pub struct FileName { + name: DString<8>, + ext: DString<3> +} \ No newline at end of file