diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2022-08-05 16:57:53 +0300 |
---|---|---|
committer | Konstantin Aladyshev <aladyshev22@gmail.com> | 2022-08-05 16:57:53 +0300 |
commit | 454eef0d67e82b7ce04bee76069b0d69da2deea6 (patch) | |
tree | a43507058913c5223127f404d54fc42782ceae42 /Lessons/Lesson_20 | |
parent | e26e327f7e3d27264e1986969a981ecd4d4ea116 (diff) | |
download | UEFI-Lessons-454eef0d67e82b7ce04bee76069b0d69da2deea6.tar.gz UEFI-Lessons-454eef0d67e82b7ce04bee76069b0d69da2deea6.tar.bz2 UEFI-Lessons-454eef0d67e82b7ce04bee76069b0d69da2deea6.zip |
PCDLesson updates
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Diffstat (limited to 'Lessons/Lesson_20')
-rw-r--r-- | Lessons/Lesson_20/README.md | 6 | ||||
-rw-r--r-- | Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h | 23 | ||||
-rw-r--r-- | Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec | 7 |
3 files changed, 33 insertions, 3 deletions
diff --git a/Lessons/Lesson_20/README.md b/Lessons/Lesson_20/README.md index e9ad949..8dab81d 100644 --- a/Lessons/Lesson_20/README.md +++ b/Lessons/Lesson_20/README.md @@ -631,6 +631,12 @@ typedef struct { #endif ``` +Add the `Include` folder to the DEC file: +``` +[Includes] + Include +``` + You can use the created `CustomStruct` structure type and initialize its values via this sytnax: ``` gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct|{0}|CustomStruct|0x535D4CB5 { diff --git a/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h b/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h new file mode 100644 index 0000000..0b9eab0 --- /dev/null +++ b/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h @@ -0,0 +1,23 @@ +#ifndef CUSTOM_PCD_TYPES_H +#define CUSTOM_PCD_TYPES_H + +typedef struct { + EFI_GUID Guid; + CHAR16 Name[6]; +} InnerCustomStruct; + +typedef struct { + UINT8 Val8; + UINT32 Val32[2]; + InnerCustomStruct ValStruct; + union { + struct { + UINT8 Field1:1; + UINT8 Field2:4; + UINT8 Filed3:3; + } BitFields; + UINT8 Byte; + } ValUnion; +} CustomStruct; + +#endif diff --git a/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec b/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec index 2fb6e56..3ce3c6e 100644 --- a/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec +++ b/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec @@ -9,9 +9,10 @@ PACKAGE_NAME = UefiLessonsPkg
PACKAGE_GUID = 7e7edbba-ca2c-4177-a3f0-d3371358773a
PACKAGE_VERSION = 1.01
-
-[Includes]
-
+ +[Includes] + Include + [LibraryClasses]
[Guids]
|