43 lines
1.5 KiB
C
43 lines
1.5 KiB
C
// BLOCK LEN 1 und MAX_FIR_COEFFS 64 werden vom Compiler mitgegeben
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
// Register und Bitmasken für Interrupts zwischen ARM und LPDSP Prozessor
|
|
#define CSS_CMD 0xC00004
|
|
#define CSS_CMD_0 (1<<0)
|
|
#define CSS_CMD_1 (1<<1)
|
|
|
|
// Shared Memory von ARM und DSP definieren
|
|
#define INPUT_PORT0_ADD 0x800000 // Feste Adressen für Eingangsdaten im Shared Memory
|
|
#define OUTPUT_PORT_ADD (INPUT_PORT0_ADD + 16) // Feste Adressen für Ausgangsdatensdaten im Shared Memory, 16 Byte von Eingangsadresse Weg
|
|
|
|
//Chess Compiler spezifisch: Interrupt-Register festlegen um ARM zu kontaktieren nach fertiger Berechnung
|
|
volatile static unsigned char chess_storage(DMIO:CSS_CMD) css_cmd_flag;
|
|
|
|
static volatile int16_t chess_storage(DMB:INPUT_PORT0_ADD) input_port[4];
|
|
static volatile int16_t chess_storage(DMB:OUTPUT_PORT_ADD) output_port[4];
|
|
static volatile int16_t chess_storage(DMB) *pointer;
|
|
static volatile int16_t chess_storage(DMB) *input_pointer_0;
|
|
static volatile int16_t chess_storage(DMB) *input_pointer_1;
|
|
static volatile int16_t chess_storage(DMB) *output_pointer;
|
|
static volatile int16_t chess_storage(DMB) *sample_pointer;
|
|
static volatile int16_t chess_storage(DMB) sample; //Speicherplatz für Ergebnis der calc()-Funktion
|
|
|
|
int main(void){
|
|
|
|
sample = 123;
|
|
|
|
input_port[0] = 100;
|
|
input_port[1] = 101;
|
|
input_port[2] = 102;
|
|
input_port[3] = 103;
|
|
pointer = &input_port[0];
|
|
output_port[0] = 200;
|
|
output_port[1] = 201;
|
|
output_port[2] = 202;
|
|
output_port[3] = 203;
|
|
|
|
|
|
}
|