/************************************************************************/ /* TALKTHRU.C Written by: Jerry Lenaz, 12/21/92 */ /* Revised by: Matt Begg, 1/5/93 */ /************************************************************************/ /* This is a talkthru program written entirely in C to be used */ /* with the ADSP-21020 EZ-LAB board. */ /* */ /* This talkthru program defines the port addressses for the */ /* particular input and output channel being used, sets up the */ /* IRQ3 interrrupt to call the talkthru routine, and sets up */ /* an idle wait loop to conserve power while waiting for the */ /* interrupt. */ /************************************************************************/ #include <21020.h> /* For the idle() command */ #include /* For the interrupt command */ #include /* For the segment function */ volatile int in_port segment(hip_reg0); /* hip_reg0 and hip_reg2 are */ volatile int out_port segment(hip_reg2);/* used in architecture file */ void process_input(int); void main(void) { interrupt(SIG_IRQ3, process_input); while (1) { idle(); } } void process_input(int sig_number) { out_port = in_port; }