Na Dsp - Townshend Computer Tools DAT-Link User Manual

Table of Contents

Advertisement

174
NAME
NASetDSPProgram, NAGetDSPProgram, NADSPWrite, NADSPRead – library routines for DSP32C
access
D
ESCRIPTION
These routines allow C programs to access the DSP32C processor inside the DAT-Link using the
NetAudio server on the local machine or other machines connected via a network. See netaudio(3) fo
i
nformation on opening and closing connections to the NetAudio server,
ROUTINES
#include <netaudio.h>
int NASetDSPProgram(port,pgm
Aport ∗port;
N
struct Program ∗pgm
;
Set the DAT-Link's currently running DSP program to pgm. Once set, the DAT-Link software
will not attempt to load built-in programs as needed, possibly making recording or playback
i
mpossible. A null value of pgm resets the DAT-Link to use it's built-in DSP programs.
struct Program ∗NAGetDSPProgram(port)
Aport ∗port;
N
Retrieve the currently running DSP program from the DAT-Link server.
int NADSPWrite(port,addr,buffer,buflen)
Aport ∗port;
N
unsigned int addr
;
onst char ∗buffer;
c
int buflen;
Writes data to the DSP32C's memory using the NetAudio server. A connection to the server
must be opened using NAOpen() before using this routine. Data should be stored in buffer in
t
he DSP32C byte order, regardless of the host byte-ordering. Note that whenever the DSP32C
is restarted due to invocation of narecord(1),naplay(1) or other NetAudio programs, th
D
SP32C is automatically reloaded with the current program. Thus, NASetDSPProgram()
should be used to load a new program that is meant to operate with other NetAudio software.
T
he following special memory addresses write to the DSP32C's parallel (PIO) ports instead of
writing to memory. Note that modifying these registers may disable the normal NetAudio
s
oftware.
Writing a non-zero value to the IREQ1 address causes the IREQ1 line on the DSP32C to b
a
sserted (low). A zero value turns off the the IREQ1 line.
int NADSPRead(port,addr,buffer,buflen)
Aport ∗port;
N
char ∗buffer;
i
nt buflen;
Read data from the DSP32C's memory using the NetAudio server. The special addresses
)
____________________________________
_ Address
PIO Register
Size (bits)
___________________________________
0xffffff00
PAR
0
xffffff02
PDR
0xffffff04
ESR
0
xffffff06
PCR
0xffffff08
EMR
0xffffff0a
PIR
0xffffff0c
PARE
0
xffffff0e
PDR2
_ 0xffffff10
IREQ1
___________________________________

NA DSP(3)

r
e
16
16
1
6
16
1
6
16
8
16
1
e

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DAT-Link and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents