#include <delay.h>
#include <setupdat.h>
+#define SET_ANALOG_MODE()
+
/* Change to support as many interfaces as you need. */
static BYTE altiface = 0;
{
int i;
+ SET_ANALOG_MODE();
+
clear_fifo();
for (i = 0; i < 1000; i++);
EP4CFG = 0;
EP8CFG = 0;
+ SET_ANALOG_MODE();
+
/* In idle mode tristate all outputs. */
GPIFIDLECTL = 0x00; /* Don't enable CTL0-5 outputs. */
GPIFCTLCFG = 0x80; /* TRICTL=1. CTL0-2: CMOS outputs, tri-statable. */
#include <delay.h>
#include <setupdat.h>
+#define SET_ANALOG_MODE() PA7 = 1
+
/* Change to support as many interfaces as you need. */
static BYTE altiface = 0;
{
int i;
- /* Set analog mode. */
- PA7 = 1;
+ SET_ANALOG_MODE();
clear_fifo();
EP4CFG = 0;
EP8CFG = 0;
- /* Set analog mode. */
- PA7 = 1;
+ SET_ANALOG_MODE();
/* In idle mode tristate all outputs. */
GPIFIDLECTL = 0x00; /* Don't enable CTL0-5 outputs. */
#include <delay.h>
#include <setupdat.h>
+#define SET_ANALOG_MODE() PA7 = 1
+
/* Change to support as many interfaces as you need. */
static BYTE altiface = 0;
{
int i;
+ SET_ANALOG_MODE();
+
clear_fifo();
for (i = 0; i < 1000; i++);
EP4CFG = 0;
EP8CFG = 0;
+ SET_ANALOG_MODE();
+
/* In idle mode tristate all outputs. */
GPIFIDLECTL = 0x00; /* Don't enable CTL0-5 outputs. */
GPIFCTLCFG = 0x80; /* TRICTL=1. CTL0-2: CMOS outputs, tri-statable. */
OEC = 0xff;
OEA = 0x80;
- PA7 = 1;
+ SET_ANALOG_MODE();
while (TRUE) {
if (dosud) {