third_party/phoenixsuite/cpp/src/CANifier.cpp
/**
 * Sets the output of all General Pin
 * @param allPins A structure to fill with the current state of all pins.
 * @return Error Code generated by function. 0 indicates no error.
 */
Sets the output of all General Pin
@param allPins A structure to fill with the current state of all pins.
@return Error Code generated by function. 0 indicates no error.
Sets the output of all General Pin @param allPins A structure to fill with the current state of all pins . @return Error Code generated by function . 0 indicates no error .
ErrorCode CANifier::GetGeneralInputs(CANifier::PinValues &allPins) {
	ErrorCode err = c_CANifier_GetGeneralInputs(m_handle, _tempPins, sizeof(_tempPins));
	allPins.LIMF = _tempPins[LIMF];
	allPins.LIMR = _tempPins[LIMR];
	allPins.QUAD_A = _tempPins[QUAD_A];
	allPins.QUAD_B = _tempPins[QUAD_B];
	allPins.QUAD_IDX = _tempPins[QUAD_IDX];
	allPins.SCL = _tempPins[SCL];
	allPins.SDA = _tempPins[SDA];
	allPins.SPI_CLK_PWM0 = _tempPins[SPI_CLK_PWM0P];
	allPins.SPI_MOSI_PWM1 = _tempPins[SPI_MOSI_PWM1P];
	allPins.SPI_MISO_PWM2 = _tempPins[SPI_MISO_PWM2P];
	allPins.SPI_CS_PWM3 = _tempPins[SPI_CS];
	return err;
}
ErrorCode CANifier :: GetGeneralInputs ( CANifier :: PinValues & allPins ) { ErrorCode err = c_CANifier_GetGeneralInputs ( m_handle , _tempPins , sizeof ( _tempPins ) ) ; allPins . LIMF = _tempPins [ LIMF ] ; allPins . LIMR = _tempPins [ LIMR ] ; allPins . QUAD_A = _tempPins [ QUAD_A ] ; allPins . QUAD_B = _tempPins [ QUAD_B ] ; allPins . QUAD_IDX = _tempPins [ QUAD_IDX ] ; allPins . SCL = _tempPins [ SCL ] ; allPins . SDA = _tempPins [ SDA ] ; allPins . SPI_CLK_PWM0 = _tempPins [ SPI_CLK_PWM0P ] ; allPins . SPI_MOSI_PWM1 = _tempPins [ SPI_MOSI_PWM1P ] ; allPins . SPI_MISO_PWM2 = _tempPins [ SPI_MISO_PWM2P ] ; allPins . SPI_CS_PWM3 = _tempPins [ SPI_CS ] ; return err ; }
Sets the output of all General Pin
 @param allPins A structure to fill with the current state of all pins.
Sets the output of all General Pin @param allPins A structure to fill with the current state of all pins .