1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

mulle: Adapt to separate mtd_spi_nor params

This commit is contained in:
Koen Zandberg 2020-02-10 20:40:41 +01:00
parent e5fa8921b3
commit d40ccc2d6f
No known key found for this signature in database
GPG Key ID: 0E63411F8FCA8247

View File

@ -48,6 +48,15 @@ static devfs_t mulle_nvram_devfs = {
.private_data = &mulle_nvram_dev,
};
static const mtd_spi_nor_params_t mulle_nor_params = {
.opcode = &mtd_spi_nor_opcode_default,
.spi = MULLE_NOR_SPI_DEV,
.cs = MULLE_NOR_SPI_CS,
.addr_width = 3,
.mode = SPI_MODE_3,
.clk = SPI_CLK_10MHZ,
};
static mtd_spi_nor_t mulle_nor_dev = {
.base = {
.driver = &mtd_spi_nor_driver,
@ -55,12 +64,7 @@ static mtd_spi_nor_t mulle_nor_dev = {
.pages_per_sector = 256,
.sector_count = 32,
},
.opcode = &mtd_spi_nor_opcode_default,
.spi = MULLE_NOR_SPI_DEV,
.cs = MULLE_NOR_SPI_CS,
.addr_width = 3,
.mode = SPI_MODE_3,
.clk = SPI_CLK_10MHZ,
.params = &mulle_nor_params,
};
mtd_dev_t *mtd0 = (mtd_dev_t *)&mulle_nor_dev;