Structs, Functions and macros used for storing variables in memory. More...
#include "DSP2833x_Device.h"
#include "IQConstants.h"
Go to the source code of this file.
Data Structures | |
struct | sqddata |
struct | qddata |
struct | qddata3 |
Defines | |
#define | N 0 |
#define | N1 1 |
#define | N2 2 |
#define | DECLARE_DATA(varName) volatile data varName = {0,0} |
#define | DECLARE_DATA3(varName) volatile data3 varName = {0,0,0} |
#define | DECLARE_SQDDATA(varName) volatile struct sqddata varName = {0,0} |
#define | DECLARE_QDDATA(varName) volatile struct qddata varName = {0,0,0,0} |
#define | INIT_QD(z) z.q=_IQ(0.0); z.d=_IQ(0.0) |
initializes complex variable | |
#define | INIT_DATA(z) z[N]=0.0; z[N1]=0.0 |
initializes memory[2] | |
#define | INIT_DATA3(z) z[N]=0.0; z[N1]=0.0; z[N2]=0.0 |
initializes memory[3] | |
#define | INIT_QDDATA(z) INIT_DATA(z.q); INIT_DATA(z.d) |
initializes complex variable with memory[2] | |
#define | INIT_QDDATA3(z) INIT_DATA3(z.q); INIT_DATA3(z.d) |
initializes complex variable with memory[3] | |
#define | UPDATE_STATE(v) v[N1]=v[N] |
update memory[2] (n1=n) | |
#define | UPDATE_STATE3(v) v[N2]=v[N1]; v[N1]=v[N] |
update memory[3] (n2=n1, n1=n) | |
#define | UPDATEQD_STATE(vqd) UPDATE_STATE(vqd.q);UPDATE_STATE(vqd.d) |
update complex variable with memory[2] | |
#define | UPDATEQD_STATE3(vqd) UPDATE_STATE3(vqd.q);UPDATE_STATE3(vqd.d) |
update complex variable with memory[3] | |
#define | XINTF_SIZE 0x01F400 |
external RAM memory. Memory map is in sprs439.pdf | |
#define | ROM_SIZE 0x3ff80 |
internal flash memory: FLASH sectors in sprs439 pp 39 | |
Typedefs | |
typedef _iq | data [2] |
memory[2] | |
typedef _iq | data3 [3] |
memory[3] | |
Enumerations | |
enum | STORAGEMODE { OVERWRITE, NOVERWRITE } |
Functions | |
void | InitDataStorageBuffer (STORAGEMODE mode) |
static void | WriteData (volatile Uint16 *data) |
static void | WriteIQData (volatile _iq *data) |
static void | ReadData (Uint16 *data, Uint32 pos) |
static void | ReinitDataStorageBuffer (void) |
Restart writing pointer to the starting address of the internal buffer. | |
static void | WriteFloatData (volatile float *data) |
Variables | |
Uint16 | dataStorageBuffer [BUFSIZE] |
Uint16 * | dataPtr |
Uint16 * | begin |
Uint16 * | end |
Uint32 * | actualPos |
Uint16 | clearDataStorage |
STORAGEMODE | storageMode |
Structs, Functions and macros used for storing variables in memory.
File Name : DataStorage.h Project : TIMotorLIB
TI Doc: SPRS439
This module allows to store data in external (XINTF) or flash memory (
Definition in file DataStorage.h.
#define DECLARE_DATA | ( | varName | ) | volatile data varName = {0,0} |
Definition at line 42 of file DataStorage.h.
#define DECLARE_DATA3 | ( | varName | ) | volatile data3 varName = {0,0,0} |
Definition at line 43 of file DataStorage.h.
#define DECLARE_QDDATA | ( | varName | ) | volatile struct qddata varName = {0,0,0,0} |
Definition at line 45 of file DataStorage.h.
#define DECLARE_SQDDATA | ( | varName | ) | volatile struct sqddata varName = {0,0} |
Definition at line 44 of file DataStorage.h.
#define INIT_DATA | ( | z | ) | z[N]=0.0; z[N1]=0.0 |
initializes memory[2]
Definition at line 73 of file DataStorage.h.
#define INIT_DATA3 | ( | z | ) | z[N]=0.0; z[N1]=0.0; z[N2]=0.0 |
initializes memory[3]
Definition at line 75 of file DataStorage.h.
#define INIT_QD | ( | z | ) | z.q=_IQ(0.0); z.d=_IQ(0.0) |
initializes complex variable
Definition at line 71 of file DataStorage.h.
#define INIT_QDDATA | ( | z | ) | INIT_DATA(z.q); INIT_DATA(z.d) |
initializes complex variable with memory[2]
Definition at line 77 of file DataStorage.h.
#define INIT_QDDATA3 | ( | z | ) | INIT_DATA3(z.q); INIT_DATA3(z.d) |
initializes complex variable with memory[3]
Definition at line 79 of file DataStorage.h.
#define N 0 |
Definition at line 38 of file DataStorage.h.
#define N1 1 |
Definition at line 39 of file DataStorage.h.
#define N2 2 |
Definition at line 40 of file DataStorage.h.
#define ROM_SIZE 0x3ff80 |
internal flash memory: FLASH sectors in sprs439 pp 39
Definition at line 94 of file DataStorage.h.
#define UPDATE_STATE | ( | v | ) | v[N1]=v[N] |
update memory[2] (n1=n)
Definition at line 81 of file DataStorage.h.
#define UPDATE_STATE3 | ( | v | ) | v[N2]=v[N1]; v[N1]=v[N] |
update memory[3] (n2=n1, n1=n)
Definition at line 83 of file DataStorage.h.
#define UPDATEQD_STATE | ( | vqd | ) | UPDATE_STATE(vqd.q);UPDATE_STATE(vqd.d) |
update complex variable with memory[2]
Definition at line 85 of file DataStorage.h.
#define UPDATEQD_STATE3 | ( | vqd | ) | UPDATE_STATE3(vqd.q);UPDATE_STATE3(vqd.d) |
update complex variable with memory[3]
Definition at line 87 of file DataStorage.h.
#define XINTF_SIZE 0x01F400 |
external RAM memory. Memory map is in sprs439.pdf
Definition at line 91 of file DataStorage.h.
typedef _iq data[2] |
memory[2]
Definition at line 59 of file DataStorage.h.
typedef _iq data3[3] |
memory[3]
Definition at line 60 of file DataStorage.h.
enum STORAGEMODE |
Definition at line 96 of file DataStorage.h.
void InitDataStorageBuffer | ( | STORAGEMODE | mode | ) |
Initializes Buffer to hold data into internal memory
mode,: | Data storage can be configured to OVERWRITE, NOVERWRITE. In OVERWRITE mode, the writing mechanism is restarted once the buffer end is reached, In NOVERWRITE the writing is stopped at the end buffer. |
Definition at line 306 of file DataStorage.c.
static void ReadData | ( | Uint16 * | data, | |
Uint32 | pos | |||
) | [inline, static] |
Reads Uint16 data from internal memory
data,: | pointer to variable to store the read data | |
pos,: | memory position holding the data |
Definition at line 233 of file DataStorage.h.
static void ReinitDataStorageBuffer | ( | void | ) | [inline, static] |
Restart writing pointer to the starting address of the internal buffer.
Definition at line 241 of file DataStorage.h.
static void WriteData | ( | volatile Uint16 * | data | ) | [inline, static] |
Write Uint16 data to internal memory
data,: | value to be written |
Definition at line 200 of file DataStorage.h.
static void WriteFloatData | ( | volatile float * | data | ) | [inline, static] |
Write float value to internal memory
data,: | value to be written |
Definition at line 175 of file DataStorage.h.
static void WriteIQData | ( | volatile _iq * | data | ) | [inline, static] |
Write IQ value to internal memory
data,: | value to be written |
Definition at line 217 of file DataStorage.h.
Uint32* actualPos |
Definition at line 35 of file DataStorage.c.
Uint16* begin |
Definition at line 33 of file DataStorage.c.
Uint16 clearDataStorage |
Definition at line 36 of file DataStorage.c.
Uint16* dataPtr |
Definition at line 32 of file DataStorage.c.
Uint16 dataStorageBuffer[BUFSIZE] |
Definition at line 31 of file DataStorage.c.
Uint16* end |
Definition at line 34 of file DataStorage.c.
Definition at line 37 of file DataStorage.c.