Skip to content

Commit

Permalink
Make nbgl compilable without qrcode in the SDK_SOURCE_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
apaillier-ledger committed Aug 3, 2023
1 parent aee2e38 commit 8921ad5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib_nbgl/src/nbgl_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#include "nbgl_fonts.h"
#include "nbgl_debug.h"
#include "nbgl_side.h"
#ifdef NBGL_QRCODE
#include "qrcodegen.h"
#endif
#include "glyphs.h"
#include "os_pic.h"
#include "os_utils.h"
Expand All @@ -32,11 +34,13 @@
/**********************
* TYPEDEFS
**********************/
#ifdef NBGL_QRCODE
typedef struct {
uint8_t qrcode[qrcodegen_BUFFER_LEN_MAX];
uint8_t tempBuffer[qrcodegen_BUFFER_LEN_MAX];
uint8_t QrDrawBuffer[QR_PIXEL_WIDTH_HEIGHT * QR_PIXEL_WIDTH_HEIGHT * QR_MAX_PIX_SIZE / 8];
} QrCodeBuffer_t;
#endif

#define qrcode ((QrCodeBuffer_t*)ramBuffer)->qrcode
#define tempBuffer ((QrCodeBuffer_t*)ramBuffer)->tempBuffer
Expand Down

0 comments on commit 8921ad5

Please sign in to comment.