diff --git a/CMakeLists.txt b/CMakeLists.txt index 3315682..53864f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 17) # Initialise pico_sdk from installed location # (note this can come from environment, CMake cache etc) -#set(PICO_SDK_PATH "/home/brodbemn/pico/pico-sdk") +#set(PICO_SDK_PATH "/home/myuser/pico/pico-sdk") set(PICO_BOARD pico CACHE STRING "Board type") @@ -23,18 +23,19 @@ project(raspi_keyer C CXX ASM) # Initialise the Raspberry Pi Pico SDK pico_sdk_init() -# Add executable. Default name is the project name, version 0.1 - +# Add executable. Default name is the project name add_executable(raspi_keyer) add_subdirectory(src) pico_set_program_name(raspi_keyer "raspi_keyer") -pico_set_program_version(raspi_keyer "0.1") +pico_set_program_version(raspi_keyer "0.0.1") pico_enable_stdio_uart(raspi_keyer 1) pico_enable_stdio_usb(raspi_keyer 0) +target_compile_options(raspi_keyer PRIVATE -Wall -Wextra -Werror) + # Add the standard library to the build target_link_libraries(raspi_keyer pico_stdlib) diff --git a/src/settings.cpp b/src/settings.cpp index 2f5c147..26392cd 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -13,7 +13,7 @@ namespace void flash_store_callback(void *settings) { - int writeSize = (sizeof(struct Settings) / FLASH_PAGE_SIZE) + 1; + //int writeSize = (sizeof(struct Settings) / FLASH_PAGE_SIZE) + 1; flash_range_erase(FLASH_TARGET_OFFSET, FLASH_SECTOR_SIZE); flash_range_program(FLASH_TARGET_OFFSET, (uint8_t *)settings, FLASH_PAGE_SIZE);