~aleteoryx/muditaos

ref: 74ae1a6589caaf2f822bec932476bbd4b4c12a94 muditaos/module-platform/rt1051/src/BlockDeviceFactory.cpp -rw-r--r-- 641 bytes
74ae1a65 — Marcin Smoczyński [EGD-7031] Remove UT deps to the production image 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BlockDeviceFactory.hpp"
#include "disk_eeprom.hpp"
#include "disk_emmc.hpp"

#include <board/rt1051/bsp/eeprom/M24256.hpp>

using platform::rt1051::BlockDeviceFactory;

std::unique_ptr<purefs::blkdev::disk> BlockDeviceFactory::makeDefaultBlockDevice()
{
    return std::make_unique<purefs::blkdev::disk_emmc>();
}

std::unique_ptr<purefs::blkdev::disk> BlockDeviceFactory::makeDefaultNvmDevice()
{
    return std::make_unique<purefs::blkdev::disk_eeprom>(bsp::eeprom::M24256_MEM_DEVICE_ADDR);
}