diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-05 14:50:32 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-05 14:50:32 +0200 |
| commit | a974f2b8861bfd60613d1bf441f77a5aa0c6f76a (patch) | |
| tree | 19ef849b3d1bb785519a7998f13ceb0e30b0b079 /Boot | |
| parent | cc03f40d9fb1d68bfd945284a3ff5067dfd8475a (diff) | |
[IMP] QR code on ke_stop screen instead of bootscreen.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Boot')
| -rw-r--r-- | Boot/BootKit/Support.hxx | 4 | ||||
| -rw-r--r-- | Boot/BootKit/Vendor/Qr.hxx | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Boot/BootKit/Support.hxx b/Boot/BootKit/Support.hxx index 4acffb75..95052435 100644 --- a/Boot/BootKit/Support.hxx +++ b/Boot/BootKit/Support.hxx @@ -12,12 +12,16 @@ #define cLongMax ((long)(~0UL >> 1)) #define cLongMin (~cLongMax) +#ifdef __NEWOSLDR__ + #define SetMem(dst, c, sz) memset(dst, c, sz) #define MoveMem(dst, src, sz) memcpy(dst, src, sz) #define CopyMem(dst, src, sz) memcpy(dst, src, sz) #define StrLen(src) strlen(src) #define StrCmp(dst, src) strcmp(dst, src) +#endif // __NEWOSLDR__ + inline int IsSpace(int c) { return c == ' '; diff --git a/Boot/BootKit/Vendor/Qr.hxx b/Boot/BootKit/Vendor/Qr.hxx index 365cd7d1..e7d82547 100644 --- a/Boot/BootKit/Vendor/Qr.hxx +++ b/Boot/BootKit/Vendor/Qr.hxx @@ -2,17 +2,20 @@ #define QR_HXX extern "C" { + #include <math.h> #include <stddef.h> #include <stdint.h> + } #include <BootKit/Vendor/Shared/base.h> #include <BootKit/Vendor/Shared/bit.h> #include <BootKit/Vendor/QrPrelude.hxx> -#include <Modules/CoreCG/FbRenderer.hxx> #include <BootKit/Support.hxx> + +#include <Modules/CoreCG/FbRenderer.hxx> #include <CompilerKit/Detail.hxx> /// @note the QR code is still code 128, it utilizes the same concept of having it's own character set. @@ -202,7 +205,7 @@ namespace qr } // Reed-Solomon Ecc generator polynomial for the given degree. - constexpr void gf_gen_poly(int degree, uint8_t* poly) + inline void gf_gen_poly(int degree, uint8_t* poly) { SetMem(poly, 0, degree); @@ -218,7 +221,7 @@ namespace qr } // Polynomial division if Galois Field. - constexpr void gf_poly_div(uint8_t* dividend, size_t len, uint8_t* divisor, int degree, uint8_t* result) + inline void gf_poly_div(uint8_t* dividend, size_t len, uint8_t* divisor, int degree, uint8_t* result) { SetMem(result, 0, degree); |
