Stm32 support (#12)

* 1st version for STM32

bit detection and EEPROM changed to support STM32

* added STM32F1 support

updated files: library.properties. NmraDcc.cpp, NmraDcc.h

* switch off debug output

* missing #endif added

Testports for esp8266 defined
This commit is contained in:
Franz-Peter
2017-01-30 05:08:41 +01:00
committed by Alex Shepherd
parent dafa1c9964
commit f8f106962f
3 changed files with 77 additions and 49 deletions

View File

@@ -42,6 +42,8 @@
#include "WProgram.h"
#endif
#include "EEPROM.h"
#ifndef NMRADCC_IS_IN
#define NMRADCC_IS_IN
@@ -93,8 +95,11 @@ typedef struct
#if defined(ESP8266)
#include <spi_flash.h>
#define MAXCV SPI_FLASH_SEC_SIZE
#elif defined( __STM32F1__)
#define MAXCV (EEPROM_PAGE_SIZE/4 - 1) // number of storage places (CV address could be larger
// because STM32 uses virtual adresses)
#else
#define MAXCV E2END // the upper limit of the CV value currently defined to max memory.
#define MAXCV E2END // the upper limit of the CV value currently defined to max memory.
#endif
typedef enum {