//
// receiver.h
//

#ifndef RECEIVER_H_
#define RECEIVER_H_


namespace Receiver
{
	/**
	 * Setup the Arduino as required.
	 */
	void setup();
	
	/**
	 * Attempt to read channels.  The call is non-blocking and reutrns true if a
	 * full frame of NUM_CHANNELS has been read.  When this is the case, and not
	 * otherwise, the channel_values array will contain NUM_CHANNELS number of
	 * channel values in the range 0 to MAX_CHANNEL_VALUE.  At other times the
	 * array is used to store values read so far and should not be relied upon.
	 * 
	 * @param channel_values array to store channel values in
	 * @returns true if a frame has been read
	 */
	bool read_channels( int channel_values[] );
}


#endif //RECEIVER_H_
