MATLAB EMBEDDED IDE LINK 4 - FOR USE WITH TEXAS INSTRUMENTS CODE COMPOSER STUDIO Especificaciones Pagina 74

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 126
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 73
Reviewing the Source Code
5-4
The dataIO function calls SWI_dec, which decrements a counter
associated with a software interrupt object. When the counter
reaches 0, the software interrupt schedules its function for execution
and resets the counter.
The dataIO function simulates hardware-based data I/O. A typical
program accumulates data in a buffer until it has enough data to
process. In this example, the dataIO function is performed 10 times
for each time the processing function is performed. The counter
decremented by SWI_dec controls this.
#include <std.h>
#include <log.h>
#include <swi.h>
#include "volume.h"
/* Global declarations */
Int inp_buffer[BUFSIZE]; /* processing data buffers */
Int out_buffer[BUFSIZE];
Int gain = MINGAIN; /* volume control variable */
Uns processingLoad = BASELOAD; /* processing load value */
/* Objects created by the Configuration Tool */
extern far LOG_Obj trace;
extern far SWI_Obj processing_SWI;
/* Functions */
extern Void load(Uns loadValue);
Int processing(Int *input, Int *output);
Void dataIO(Void);
/* ======== main ======== */
Void main()
{
LOG_printf(&trace,"volume example started\n");
/* fall into DSP/BIOS idle loop */
return;
}
Vista de pagina 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 125 126

Comentarios a estos manuales

Sin comentarios