From ae9a188b4dcb05797115f4d8d73fd6c668bf83c4 Mon Sep 17 00:00:00 2001 From: Tobias Simetsreiter Date: Tue, 12 Nov 2024 15:08:44 +0100 Subject: [PATCH] lowercase 'Windows.h' in main.cpp for mingw32 support (#168) --- main.cpp | 2 +- picoboot_connection/picoboot_connection.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 64a0ae8..0bc722d 100644 --- a/main.cpp +++ b/main.cpp @@ -7496,7 +7496,7 @@ bool reboot_command::execute(device_map &devices) { #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN -#include +#include #elif defined(__linux__) || defined(__APPLE__) #include #endif diff --git a/picoboot_connection/picoboot_connection.h b/picoboot_connection/picoboot_connection.h index 436943f..8c2ca22 100644 --- a/picoboot_connection/picoboot_connection.h +++ b/picoboot_connection/picoboot_connection.h @@ -81,6 +81,9 @@ int picoboot_flash_id(libusb_device_handle *usb_device, uint64_t *data); // we require 256 (as this is the page size supported by the device) #define LOG2_PAGE_SIZE 8u +#ifdef PAGE_SIZE +#undef PAGE_SIZE +#endif #define PAGE_SIZE (1u << LOG2_PAGE_SIZE) #define FLASH_SECTOR_ERASE_SIZE 4096u