Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions main/pages/capture_entropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "../components/video/video.h"
#include "../ui/dialog.h"
#include "../ui/input_helpers.h"
#include "../ui/theme_widgets.h"
#include "../utils/memory_utils.h"
#include "../utils/secure_mem.h"
Expand Down Expand Up @@ -83,6 +84,15 @@ static void low_entropy_prompt_cb(bool retry, void *user_data) {
// If retry (Yes), do nothing - user stays on camera page
}

static void back_btn_cb(lv_event_t *e) {
(void)e;
if (closing)
return;
closing = true;
if (return_callback)
return_callback();
}

static uint8_t *allocate_buffer(size_t size) {
// PPA writes directly into these buffers, so they must be cache-line aligned.
size_t aligned = (size + CONFIG_CACHE_L2_CACHE_LINE_SIZE - 1) &
Expand Down Expand Up @@ -337,6 +347,8 @@ void capture_entropy_page_create(lv_obj_t *parent, void (*return_cb)(void)) {
lv_obj_set_style_text_color(instruction, highlight_color(), 0);
lv_obj_align(instruction, LV_ALIGN_BOTTOM_MID, 0, -theme_default_padding());

ui_create_back_button(capture_screen, back_btn_cb);

if (!camera_init()) {
ESP_LOGE(TAG, "Failed to initialize camera");
return;
Expand Down
Loading