Software/MPU/src/Setup.cpp
int initHardware(struct Container *container, struct Args *args)
{
	if (args->debugEnabled)
		std::cout << "Setting up WiringPi..." << std::endl;

	if (wiringPiSetup())
	{
		std::cout << "Failed to set up WiringPi." << std::endl;
		return -1;
	}

	if (midiIOSetup(container, args))
	{
		std::cout << "Failed to set up MIDI I/O." << std::endl;
		return -1;
	}

	if (radioSetup(container, args))
	{
		std::cout << "Failed to set up radio transceiver." << std::endl;
		return -1;
	}

	if (keypadSetup(container, args))
	{
		std::cout << "Failed to set up keypad." << std::endl;
		return -1;
	}

	return 0;
}
/**
 * Initial Hardware Setup
 *
 * This function initialize the device to interface with hardware.
 * 
 * @return setup status
 */
Initial Hardware Setup
This function initialize the device to interface with hardware.

@return setup status
Initial Hardware Setup This function initialize the device to interface with hardware . @return setup status
int initHardware(struct Container *container, struct Args *args)
{
	if (args->debugEnabled)
		std::cout << "Setting up WiringPi..." << std::endl;
	if (wiringPiSetup())
	{
		std::cout << "Failed to set up WiringPi." << std::endl;
		return -1;
	}
	if (midiIOSetup(container, args))
	{
		std::cout << "Failed to set up MIDI I/O." << std::endl;
		return -1;
	}
	if (radioSetup(container, args))
	{
		std::cout << "Failed to set up radio transceiver." << std::endl;
		return -1;
	}
	if (keypadSetup(container, args))
	{
		std::cout << "Failed to set up keypad." << std::endl;
		return -1;
	}
	return 0;
}
int initHardware ( struct Container * container , struct Args * args ) { if ( args -> debugEnabled ) std :: cout << " " << std :: endl ; if ( wiringPiSetup ( ) ) { std :: cout << " " << std :: endl ; return -1 ; } if ( midiIOSetup ( container , args ) ) { std :: cout << " " << std :: endl ; return -1 ; } if ( radioSetup ( container , args ) ) { std :: cout << " " << std :: endl ; return -1 ; } if ( keypadSetup ( container , args ) ) { std :: cout << " " << std :: endl ; return -1 ; } return 0 ; }
Initial Hardware Setup
 This function initialize the device to interface with hardware.
Initial Hardware Setup This function initialize the device to interface with hardware .