Enable wear leveling spi flash eeprom for feather f405
This commit is contained in:
parent
79c269e7df
commit
45a1c92e04
4 changed files with 37 additions and 0 deletions
|
@ -12,3 +12,16 @@
|
|||
#define DRV2605L_FB_ERM_LRA 0
|
||||
#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
|
||||
#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100
|
||||
|
||||
/* spi config for eeprom and pmw3360 sensor */
|
||||
#define SPI_DRIVER SPID1
|
||||
#define SPI_SCK_PIN B3
|
||||
#define SPI_SCK_PAL_MODE 5
|
||||
#define SPI_MOSI_PIN B5
|
||||
#define SPI_MOSI_PAL_MODE 5
|
||||
#define SPI_MISO_PIN B4
|
||||
#define SPI_MISO_PAL_MODE 5
|
||||
|
||||
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN A15
|
||||
#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 32 // 16 or less doesn't work right
|
||||
#define EXTERNAL_FLASH_SIZE (2 * 1024 * 1024)
|
||||
|
|
|
@ -19,4 +19,9 @@
|
|||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#if HAL_USE_SPI == TRUE
|
||||
# define SPI_USE_WAIT TRUE
|
||||
# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
#endif
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
"haptic": {
|
||||
"driver": "drv2605l"
|
||||
},
|
||||
"eeprom": {
|
||||
"wear_leveling": {
|
||||
"driver": "spi_flash",
|
||||
"logical_size": 16384,
|
||||
"backing_size": 65536
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": [null, null, null, null],
|
||||
"rows": [null, null, null, null]
|
||||
|
|
|
@ -20,3 +20,15 @@
|
|||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
||||
|
||||
#if HAL_USE_SPI == TRUE
|
||||
# undef STM32_SPI_USE_SPI1
|
||||
# define STM32_SPI_USE_SPI1 TRUE
|
||||
|
||||
# undef STM32_SPI_SPI1_TX_DMA_STREAM
|
||||
# define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||
# undef STM32_SPI_SPI1_RX_DMA_STREAM
|
||||
# define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue