distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
SpiEeprom.cpp File Reference

SpiEeprom class implementation. More...

Include dependency graph for SpiEeprom.cpp:

Namespaces

 distortos
 Top-level namespace of distortos project.
 
 distortos::devices
 Device drivers.
 

Typedefs

using distortos::devices::anonymous_namespace{SpiEeprom.cpp}::CommandWithAddressBuffer = std::array< uint8_t, 4 >
 buffer for command and address More...
 

Functions

SpiMasterOperation::Transfer distortos::devices::anonymous_namespace{SpiEeprom.cpp}::getCommandWithAddress (const size_t capacity, const uint8_t command, const uint32_t address, CommandWithAddressBuffer &buffer)
 Combines command with address into a "transfer" SpiMasterOperation. More...
 

Variables

constexpr uint8_t distortos::devices::anonymous_namespace{SpiEeprom.cpp}::rdsrCommand {0x5}
 RDSR (read status register) command. More...
 
constexpr uint8_t distortos::devices::anonymous_namespace{SpiEeprom.cpp}::readCommand {0x3}
 READ command. More...
 
constexpr uint8_t distortos::devices::anonymous_namespace{SpiEeprom.cpp}::wrenCommand {0x6}
 WREN (write enable) command. More...
 
constexpr uint8_t distortos::devices::anonymous_namespace{SpiEeprom.cpp}::writeCommand {0x2}
 WRITE command. More...
 
constexpr uint8_t distortos::devices::anonymous_namespace{SpiEeprom.cpp}::statusRegisterWip {1 << 0}
 mask of WIP (write in progress) bit in status register More...
 

Detailed Description

SpiEeprom class implementation.

Author
Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.