#ifndef _COMMLIB_PARENT_H_
#define _COMMLIB_PARENT_H_

#include "commlib-common.h"

/* 
 * Parent-child port functionality:
 *   Port A: Data I/O (bits [7:0])
 *   Port E: Control input (bits [2:0])
 *   Port G: Control output (bits [2:0])
 */



/* parent_write_block_to_child should be called only after DONE_BLOCK or
 * REQ_BLOCK received from child */
void parent_write_block_to_child(char *data, int n);
/* parent_read_block_from_child should be called only after DONE_BLOCK or
 * REQ_BLOCK received from child. Returns number of bytes read. */
int parent_read_block_from_child(char *dest);


#endif /* ifdef _COMMLIB_PARENT_H_ */
