/* Collection Of Robot Drivers (CORD) for Johuco Phoenix robot */
/* Copyright 1997, Johuco Ltd., All Rights Reserved */
/* Written by Jon Connell, 10/97, Version 1.3 beta  */

/* --------------------------------------------------------------------- */

#ifndef _CORD_

/* array of variables which are not zeroed on reset - defined in "crt.s" */
/* all other globals and statics ARE zeroed on reset for convenience     */

extern int calib[10];


/* --------------------------------------------------------------------- */

/* function prototypes */

void left_led (int val);
void right_led (int val);
void both_leds (int val);
void val_to_leds (int val);
void beeper (int val, int toggle_us);
void beep (void);
void tone (void);
void quiet (void);

void drive (int dir, int stop_us);
void turn (int dir, int stop_us);
void forward (void);
void backward (void);
void left (void);
void right (void);
void straight (void);
void stop (void);

int ir_blip (int narrow);
int ir_bits (int narrow, int power);
int ir_pulse (int narrow, int power, int cycles);
void ir_wait (void);
int left_ir (void);
int right_ir (void);
int both_ir (void);
int lir_time (void);
int rir_time (void);
int passive_ir (int wait);
int passive_25 (int wait);

int knob (void);
int button (void);
int battery (void);
int roll (void);
int shakiness (void);
int top_photo (void);
int front_photo (void);
void digitize_group (int group, int *result1, int *result2, 
		     int *result3, int *result4);

void sleep_us (int time);
void sleep_ms (int time);
void await_tick (void);
int clock (void);
void resync (int ref, int delta);

/* -------------------------------------------------------------- */

/* This should really be a library. But since the freeware ICC11  */
/* compiler does not support this, the .c file is included here.  */

#define _CORD_
#include <cord.c>

#endif


/* ==================================================================== */

