aboutsummaryrefslogtreecommitdiffstats
path: root/lab1/RTDSP
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-01-21 19:46:42 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-01-21 19:46:42 +0000
commit921fd2865e785c53e3167f4588055c5a84d58b5a (patch)
treeccb01076119829e069fc1e677f1082e49134d1f1 /lab1/RTDSP
parent4a9500af0549cf544c608c1dde7dd92f86f00c5c (diff)
downloadNoiseSilencer-921fd2865e785c53e3167f4588055c5a84d58b5a.tar.gz
NoiseSilencer-921fd2865e785c53e3167f4588055c5a84d58b5a.zip
Cleaning files
Diffstat (limited to 'lab1/RTDSP')
-rw-r--r--lab1/RTDSP/volume.c66
-rw-r--r--lab1/RTDSP/volume.h12
2 files changed, 39 insertions, 39 deletions
diff --git a/lab1/RTDSP/volume.c b/lab1/RTDSP/volume.c
index 3da8881..43958f8 100644
--- a/lab1/RTDSP/volume.c
+++ b/lab1/RTDSP/volume.c
@@ -1,20 +1,20 @@
/*************************************************************************************
- DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
- IMPERIAL COLLEGE LONDON
+ DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
+ IMPERIAL COLLEGE LONDON
- EE 3.19: Real Time Digital Signal Processing
- Dr Paul Mitcheson and Daniel Harvey
+ EE 3.19: Real Time Digital Signal Processing
+ Dr Paul Mitcheson and Daniel Harvey
- LAB 1: Getting Started with the TI C6x DSP
+ LAB 1: Getting Started with the TI C6x DSP
- ********* V O L U M E . C **********
+ ********* V O L U M E . C **********
- Part of the volume example. Demonstrates connecting the DSK
- to sinewave data stored on the host PC.
- Sinewave is then processed by increasing its gain.
- Additionally demonstrates calling an assembly routine from C.
+ Part of the volume example. Demonstrates connecting the DSK
+ to sinewave data stored on the host PC.
+ Sinewave is then processed by increasing its gain.
+ Additionally demonstrates calling an assembly routine from C.
*************************************************************************************
- Updated for use on 6713 DSK by Danny Harvey: May-Aug 2006
+ Updated for use on 6713 DSK by Danny Harvey: May-Aug 2006
************************************************************************************/
/* "@(#) DSP/BIOS 4.90.270 01-08-04 (bios,dsk6713-c04)" */
@@ -24,19 +24,19 @@
#include "volume.h"
/******************************* Global declarations ********************************/
-// note: for see volume.h for initialisaton of BUFSIZE, MINGAIN and BASELOAD
+// note: for see volume.h for initialisaton of BUFSIZE, MINGAIN and BASELOAD
// and defintion of PARMS
-int inp_buffer[BUFSIZE]; // processing data buffers
+int inp_buffer[BUFSIZE]; // processing data buffers
int out_buffer[BUFSIZE];
-int gain = MINGAIN; // volume control variable
-unsigned int processingLoad = BASELOAD; // processing routine load value
-
-struct PARMS str = // A structure of type PARMS is initialised.
-{ // This struct is not used in the logic of
- 2934, // the program, it is included to demonstrate
- 9432, // how to use watch windows on structs.
- 213,
+int gain = MINGAIN; // volume control variable
+unsigned int processingLoad = BASELOAD; // processing routine load value
+
+struct PARMS str = // A structure of type PARMS is initialised.
+{ // This struct is not used in the logic of
+ 2934, // the program, it is included to demonstrate
+ 9432, // how to use watch windows on structs.
+ 213,
9432,
&str
};
@@ -50,23 +50,23 @@ static void dataIO(void);
/********************************** Main routine ************************************/
void main()
{
- int *input = &inp_buffer[0]; // use pointers to point to first element in
- int *output = &out_buffer[0]; // input and output buffers
+ int *input = &inp_buffer[0]; // use pointers to point to first element in
+ int *output = &out_buffer[0]; // input and output buffers
- puts("volume example started\n"); // send a message to stdio
+ puts("volume example started\n"); // send a message to stdio
- // loop forever
+ // loop forever
while(TRUE)
- {
- // Read input data using a probe-point connected to a host file.
+ {
+ // Read input data using a probe-point connected to a host file.
// Write output data to a graph connected through a probe-point.
-
+
dataIO();
#ifdef FILEIO
puts("begin processing") /****** deliberate syntax error ******/
#endif
-
+
// process signal held in input buffer array (apply gain)
// result is returned to output buffer array
processing(input, output);
@@ -80,15 +80,15 @@ static int processing(int *input, int *output)
{
int size = BUFSIZE;
- /* loop through length of input array mutiplying by gain. Put the result in
- the output array. */
+ /* loop through length of input array mutiplying by gain. Put the result in
+ the output array. */
while(size--){
*output++ = *input++ * gain;
}
-
+
// apply additional processing load by calling assembly function load()
load(processingLoad);
-
+
return(TRUE);
}
diff --git a/lab1/RTDSP/volume.h b/lab1/RTDSP/volume.h
index c70ae5d..9b46bf5 100644
--- a/lab1/RTDSP/volume.h
+++ b/lab1/RTDSP/volume.h
@@ -3,7 +3,7 @@
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
- *
+ *
*/
/* "@(#) DSP/BIOS 4.90.270 01-08-04 (bios,dsk6713-c04)" */
/*
@@ -31,11 +31,11 @@
#define BASELOAD 1
struct PARMS {
- int Beta;
- int EchoPower;
- int ErrorPower;
- int Ratio;
- struct PARMS *Link;
+ int Beta;
+ int EchoPower;
+ int ErrorPower;
+ int Ratio;
+ struct PARMS *Link;
};
#endif /* __VOLUME_H */