14 namespace duds {
namespace hardware {
namespace interface {
67 std::shared_ptr<PinStore>
store;
121 virtual void close();
125 virtual void start();
134 const std::uint8_t * __restrict__ out,
135 std::uint8_t * __restrict__ in,
160 void setPins(
const PinIndex &pi);
172 void setPins(
const std::shared_ptr<PinIndex> &pi) {
191 const std::shared_ptr<PinStore> &store,
212 const std::shared_ptr<PinStore> &store,
unsigned int clk
The pin ID for the clock.
unsigned int clockFrequency() const noexcept
Computes and returns the maximum clock frequency in Hertz.
Provides access to multiple pins on a DigitalPort.
unsigned int dat
The pin ID for data, output if full-duplex.
A synchronous serial implementation using DigitalPin objects.
void setPins(const PinIndex &pi)
Sets the pins to use based on names already set in the PinIndex.
The input pin for full-duplex.
unsigned int clockPeriod() const noexcept
Returns the minimum clock period in nanoseconds.
virtual void open()
Gets the required access objects.
DigitalPinMasterSyncSerial()
An object to wrap together a ChipSelectManager and chip ID to simplify code that needs to repeatedly ...
virtual void stop()
Deselects the device and assures the clock is in the idle state.
Represents a set of pins on a single DigitalPort.
PinPos
Pin positions of the items in the pin set.
An object used to provide chip select control to a single user at a time.
virtual void close()
Relinquishes the access objects.
~DigitalPinMasterSyncSerial()
virtual void start()
Selects the device, which may be the same as doing nothing.
Provides access to a single pin on a DigitalPort.
ChipSelect sel
Chip selection for serial interfaces that require it.
virtual void transfer(const std::uint8_t *__restrict__ out, std::uint8_t *__restrict__ in, int bits)
Moves data about.
An abstraction for the master side of a simple synchronous serial communication connection to some de...
void setPins(const std::shared_ptr< PinIndex > &pi)
Sets the pins to use based on names already set in the PinIndex.
The data pin for half-duplex.
std::shared_ptr< PinStore > store
The store of pins that manages the pins used by this serial interface.
ChipAccess chipAcc
Chip access for for serial interfaces that require chip selection.
static void checkPins(const DigitalPinSet &ps, Flags cfg)
Checks the pins' capabilities to assure they can be used in the intended role.
void setChipSelect(const ChipSelect &cs)
Sets the ChipSelect object to use for selections.
Flags flags
Configuration flags.
unsigned int datI
The pin ID for data input if full-duplex.
The output pin for full-duplex.