14 namespace duds {
namespace hardware {
namespace interface {
19 const std::shared_ptr<ChipSelectManager> &csm,
26 std::shared_ptr<ChipSelectManager> &&csm,
65 if (csm && (chipId >= 0)) {
66 if (!csm->validChip(chipId)) {
79 if (csm && (chipId >= 0)) {
80 if (!csm->validChip(chipId)) {
int chipId() const
Returns the chip ID of the chip this object will select.
boost::error_info< struct Info_ChipId, int > ChipSelectIdError
The chip select ID relavent to the error.
void modify(const std::shared_ptr< ChipSelectManager > &csm, int chipId)
Changes the manager and chip to select.
move_impl move(unsigned int c, unsigned int r)
Display stream manipulator that moves the display cursor to the given location.
int cid
The chip to select.
An object used to provide chip select control to a single user at a time.
A ChipSelectManager is required for the operation but is not set.
ChipSelect() noexcept
Initializes the object to a non-configured state.
std::unique_ptr< ChipAccess > access()
Obtains a ChipAccess object.
void reset() noexcept
Returns the object to the default constructed state of not having a manager or a valid chip ID...
std::unique_ptr< ChipAccess > select()
Obtains an access object and selects the chip.
Indicates an attempt to select a non-existant chip.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
std::shared_ptr< ChipSelectManager > mgr
The manager that will handle the selection.