MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / WriteDigital

Method WriteDigital

src/GPIO/GpOutPort.cpp:197–207  ·  view source on GitHub ↗

Set the output low or high. Called by PortControl, only supported on local ports.

Source from the content-addressed store, hash-verified

195
196// Set the output low or high. Called by PortControl, only supported on local ports.
197void GpOutputPort::WriteDigital(bool value) noexcept
198{
199 lastPwm = (value) ? 1.0 : 0.0;
200#if SUPPORT_CAN_EXPANSION
201 if (boardAddress != CanInterface::GetCanAddress())
202 {
203 return;
204 }
205#endif
206 port.WriteAnalog(lastPwm); // we must use WriteAnalog here because WriteDigital doesn't work on Duet 2 PWM ports
207}
208
209#if SUPPORT_REMOTE_COMMANDS
210

Callers 15

THROWSFunction · 0.45
AtxPowerOffMethod · 0.45
UpdatePortsMethod · 0.45
SetIREmitterMethod · 0.45
SetProbingMethod · 0.45
SendProgramMethod · 0.45
InterruptMethod · 0.45
EngageBrakeMethod · 0.45
DisengageBrakeMethod · 0.45
SendModbusRegistersMethod · 0.45
ReadModbusRegistersMethod · 0.45
ModbusRawTransactionMethod · 0.45

Calls 2

GetCanAddressFunction · 0.85
WriteAnalogMethod · 0.45

Tested by

no test coverage detected