Get E2END from pins, fix Linux buffer
This commit is contained in:
parent
01e8813286
commit
3ae3bf5d33
@ -29,7 +29,7 @@
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../shared/persistent_store_api.h"
|
||||
|
||||
#if NONE(I2C_EEPROM, SPI_EEPROM)
|
||||
#if !defined(E2END) && NONE(I2C_EEPROM, SPI_EEPROM)
|
||||
#define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)
|
||||
#endif
|
||||
|
||||
|
@ -43,8 +43,6 @@
|
||||
#define FALLING 0x03
|
||||
#define RISING 0x04
|
||||
|
||||
#define E2END 0xFFF // EEPROM end address
|
||||
|
||||
typedef uint8_t byte;
|
||||
#define PROGMEM
|
||||
#define PSTR(v) (v)
|
||||
|
@ -29,7 +29,8 @@
|
||||
#include "../shared/persistent_store_api.h"
|
||||
#include <stdio.h>
|
||||
|
||||
uint8_t buffer[E2END];
|
||||
#define LINUX_EEPROM_SIZE (E2END + 1)
|
||||
uint8_t buffer[LINUX_EEPROM_SIZE];
|
||||
char filename[] = "eeprom.dat";
|
||||
|
||||
bool PersistentStore::access_start() {
|
||||
@ -40,8 +41,8 @@ bool PersistentStore::access_start() {
|
||||
fseek(eeprom_file, 0L, SEEK_END);
|
||||
std::size_t file_size = ftell(eeprom_file);
|
||||
|
||||
if (file_size < E2END) {
|
||||
memset(buffer + file_size, eeprom_erase_value, E2END - file_size);
|
||||
if (file_size < LINUX_EEPROM_SIZE) {
|
||||
memset(buffer + file_size, eeprom_erase_value, LINUX_EEPROM_SIZE - file_size);
|
||||
}
|
||||
else {
|
||||
fseek(eeprom_file, 0L, SEEK_SET);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "../shared/persistent_store_api.h"
|
||||
|
||||
#ifndef E2END
|
||||
#define E2END 4095
|
||||
#define E2END 0xFFF // 4KB
|
||||
#endif
|
||||
#define HAL_STM32F1_EEPROM_SIZE (E2END + 1)
|
||||
|
||||
|
@ -71,11 +71,11 @@
|
||||
|
||||
/* Pages 0 and 1 base and end addresses */
|
||||
#define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x0000))
|
||||
#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1)))
|
||||
#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE - 1))
|
||||
#define PAGE0_ID FLASH_SECTOR_1
|
||||
|
||||
#define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x4000))
|
||||
#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1)))
|
||||
#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 2 * (PAGE_SIZE) - 1))
|
||||
#define PAGE1_ID FLASH_SECTOR_2
|
||||
|
||||
/* Used Flash pages for EEPROM emulation */
|
||||
|
@ -32,8 +32,7 @@
|
||||
|
||||
#define I2C_EEPROM
|
||||
|
||||
#undef E2END
|
||||
#define E2END 0xFFF // EEPROM end address (4kB)
|
||||
#define E2END 0xFFF // 4KB
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Arm'ed supports up to 2 hotends / E-steppers."
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define DEFAULT_MACHINE_NAME "STM32F407VET6"
|
||||
|
||||
//#define I2C_EEPROM
|
||||
//#define E2END 0x1FFF // EEPROM end address (8kB)
|
||||
//#define E2END 0x1FFF // 8KB
|
||||
#define SRAM_EEPROM_EMULATION
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
// Enable EEPROM Emulation for this board as it doesn't have EEPROM
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#define E2END 0xFFF // EEPROM end address (4kB)
|
||||
#define E2END 0xFFF // 4KB
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
@ -224,7 +224,7 @@
|
||||
#endif
|
||||
|
||||
#define SDSS SS_PIN
|
||||
|
||||
|
||||
//
|
||||
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
|
||||
// Must define WIFISUPPORT in Configuration.h for the printer.
|
||||
|
@ -41,14 +41,14 @@
|
||||
|
||||
//#define MCU_STM32F103ZE // not yet required
|
||||
|
||||
// // I2C EEPROM with 64K of space - AT24C64
|
||||
// #define I2C_EEPROM
|
||||
// #define E2END 0x7FFF
|
||||
// #define I2C_EEPROM // AT24C64
|
||||
// #define E2END 0x7FFF // 64KB
|
||||
|
||||
// Enable EEPROM Emulation for this board
|
||||
|
||||
//#define FLASH_EEPROM_EMULATION 1
|
||||
//#define E2END 0xFFF //((uint32)(EEPROM_START_ADDRESS + EEPROM_PAGE_SIZE + EEPROM_PAGE_SIZE)) // not 0xFFF
|
||||
//#define E2END 0xFFF // 4KB
|
||||
//#define E2END uint32(EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE * 2) - 1)
|
||||
//#define EEPROM_CHITCHAT
|
||||
//#define DEBUG_EEPROM_READWRITE
|
||||
|
||||
|
@ -201,9 +201,8 @@
|
||||
#define FIL_RUNOUT_PIN 39 // SERVO2_PIN
|
||||
#endif
|
||||
|
||||
// I2C EEPROM with 8K of space
|
||||
#define I2C_EEPROM
|
||||
#define E2END 0x1FFF
|
||||
#define E2END 0x1FFF // 8KB
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
|
@ -49,6 +49,8 @@
|
||||
#define BOARD_NAME "RAMPS 1.4"
|
||||
#endif
|
||||
|
||||
#define E2END 0xFFF // 4KB
|
||||
|
||||
#define IS_RAMPS_EFB
|
||||
|
||||
//
|
||||
|
@ -30,8 +30,7 @@
|
||||
#define DEFAULT_MACHINE_NAME BOARD_NAME
|
||||
|
||||
//#define I2C_EEPROM
|
||||
|
||||
#define E2END 0xFFF // EEPROM end address (4kB)
|
||||
#define E2END 0xFFF // 4KB
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "RUMBA32 supports up to 3 hotends / E-steppers."
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
//#define I2C_EEPROM
|
||||
|
||||
#define E2END 0xFFF // EEPROM end address (4kB)
|
||||
#define E2END 0xFFF // 4KB
|
||||
|
||||
// Ignore temp readings during develpment.
|
||||
//#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
|
||||
|
Loading…
Reference in New Issue
Block a user