From a974f2b8861bfd60613d1bf441f77a5aa0c6f76a Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Mon, 5 Aug 2024 14:50:32 +0200 Subject: [IMP] QR code on ke_stop screen instead of bootscreen. Signed-off-by: Amlal EL Mahrouss --- Boot/BootKit/Support.hxx | 4 ++++ Boot/BootKit/Vendor/Qr.hxx | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'Boot/BootKit') 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 #include #include + } #include #include #include -#include #include + +#include #include /// @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); -- cgit v1.2.3