Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed RAM_ONLY_SETTINGS by default #369

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion uCNC/cnc_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ extern "C"
* Storing is disabled and the defaults will be loaded at each power up
* This is useful if you don't have EEPROM/FLASH storage or the divide read/write maximum cycle count is low to prevent damage
* */
#define RAM_ONLY_SETTINGS
// #define RAM_ONLY_SETTINGS

/**
* EXPERIMENTAL! Uncomment to enable fast math macros to reduce the number of
Expand Down
4 changes: 1 addition & 3 deletions uCNC/src/hal/boards/rp2040/rp2040.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ board_build.f_cpu = 133000000L
[env:rpi_pico]
extends = common_rp2040
board = rpipico
platform_packages =
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#11ac5ed33efa6daeae5dea63d6c330986401a8cc
; build_src_filter = +<*>-<libraries/SerialBT>-<libraries/BTstack>
lib_ignore = HTTPUpdateServer, LittleFS, WiFi, WebServer, WiFi, SerialBT, DNSServer, Hash
build_flags = -DBOARD=BOARD_RPI_PICO

[env:rpi_pico_w]
Expand Down
5 changes: 5 additions & 0 deletions uCNC/src/hal/mcus/rp2040/mcu_rp2040.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ extern bool rp2040_uart_rx_ready(void);
extern bool rp2040_uart_tx_ready(void);
extern void rp2040_uart_process(void);

extern void rp2040_eeprom_init(int size);
extern uint8_t rp2040_eeprom_read(uint16_t address);
extern void rp2040_eeprom_write(uint16_t address, uint8_t value);
extern void rp2040_eeprom_flush(void);

uint8_t rp2040_pwm[16];

void mcu_din_isr(void)
Expand Down
8 changes: 4 additions & 4 deletions uCNC/src/hal/mcus/rp2040/rp2040_arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,22 +575,22 @@ extern "C"
#include <EEPROM.h>
extern "C"
{
static void rp2040_eeprom_init(int size)
void rp2040_eeprom_init(int size)
{
EEPROM.begin(size);
}

static uint8_t rp2040_eeprom_read(uint16_t address)
uint8_t rp2040_eeprom_read(uint16_t address)
{
return EEPROM.read(address);
}

static void rp2040_eeprom_write(uint16_t address, uint8_t value)
void rp2040_eeprom_write(uint16_t address, uint8_t value)
{
EEPROM.write(address, value);
}

static void rp2040_eeprom_flush(void)
void rp2040_eeprom_flush(void)
{
if (!EEPROM.commit())
{
Expand Down