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

boards/pinetime: update mtd_spi_nor config #13481

Merged
merged 1 commit into from
Feb 26, 2020
Merged
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
18 changes: 11 additions & 7 deletions boards/pinetime/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,24 @@
#include "periph/spi.h"

#ifdef MODULE_MTD
static const mtd_spi_nor_params_t _pinetime_nor_params = {
.opcode = &mtd_spi_nor_opcode_default,
.clk = PINETIME_NOR_SPI_CLK,
.flag = PINETIME_NOR_FLAGS,
.spi = PINETIME_NOR_SPI_DEV,
.mode = PINETIME_NOR_SPI_MODE,
.cs = PINETIME_NOR_SPI_CS,
.addr_width = 3,
};

static mtd_spi_nor_t pinetime_nor_dev = {
.base = {
.driver = &mtd_spi_nor_driver,
.page_size = PINETIME_NOR_PAGE_SIZE,
.pages_per_sector = PINETIME_NOR_PAGES_PER_SECTOR,
.sector_count = PINETIME_NOR_SECTOR_COUNT,
},
.flag = PINETIME_NOR_FLAGS,
.opcode = &mtd_spi_nor_opcode_default,
.spi = PINETIME_NOR_SPI_DEV,
.cs = PINETIME_NOR_SPI_CS,
.addr_width = 3,
.mode = PINETIME_NOR_SPI_MODE,
.clk = PINETIME_NOR_SPI_CLK,
.params = &_pinetime_nor_params,
};

mtd_dev_t *mtd0 = (mtd_dev_t *)&pinetime_nor_dev;
Expand Down