//
// comms.h
//

#ifndef COMMS_H_
#define COMMS_H_


namespace Comms
{
	/**
	 * Setup the Arduino as required.
	 */
	void setup();

	/**
	 * Write channel values.
	 *
	 * @param channel_values array of NUM_CHANNELS values
	 */
	void write_channels( int channels[] );

	/**
	 * Read channel values.  Call often.  If a complete frame is read,
	 * channel_values will contain the data.
	 *
	 * @param channel_values array of NUM_MOTORS values
	 * @returns true if a whole frame was read
	 */
	bool read_channels( int channels[] );
}


#endif //COMMS_H_
