matlab_23550/Inu/Src/N12_Xilinx/xp_plane_adr.h
Razvalyaev 7e0063eee0 #3 Скомпилилось, но пока ничего не вызывается
Все основные файлы подтянуты без изменений

Изменены (только папка main_matlab):
- заглушки для ненужных функций (main_matlab.c)
- iq библиотека (IQmathLib_matlab.c)
- библиотеки DSP281x
2025-01-13 11:09:58 +03:00

176 lines
5.8 KiB
C

#ifndef XP_PLANE_ADR_H
#define XP_PLANE_ADR_H
#include <project_setup.h>
/*------------------------------------------------------------------------------
Plane counter
------------------------------------------------------------------------------*/
/////////////////////////////////////////////////////////////////////
// Íàñòðîéêà íîìåðîâ ïëàò, äëÿ êàæäîãî ïðîåêòà ðàçíîé ìîæåò áûòü
/////////////////////////////////////////////////////////////////////
#if (C_PROJECT_TYPE==PROJECT_10510)
// Ïîäñ÷åò êîëè÷åñòâà ïëàò
//
// äëÿ âûñòàâëåíèÿ àâòîðàçìåð ìàññèâîâ â project.
// íî ò.ê. ãðàíèöó ìàññèâà ñëîæíî ïðîâåðèòü, âîçâðàùàåì â ìàêñèì. âîçìîæíûé ðàçìåð
// ïàìÿòü êóøàåò, íî ëó÷øå òàê âîçìîæíî
//
#define MAX_C_CDS_TK_NUMBER 6 // max 8
#define MAX_C_CDS_IN_NUMBER 3 // max 3
#define MAX_C_CDS_OUT_NUMBER 3 // max 3
#define MAX_C_ADC_NUMBER 3 // max 3
#define MAX_C_HWP_NUMBER 3 // max 3
#define MAX_C_CDS_RS_NUMBER 1 // max 1
/*------------------------------------------------------------------------------
Plane address
------------------------------------------------------------------------------*/
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_controller_address 1
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_cds_in0_address 2
#define C_cds_in1_address 3
#define C_cds_in2_address 4
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_cds_tk0_address 6
#define C_cds_tk1_address 7
#define C_cds_tk2_address 8
#define C_cds_tk3_address 9
#define C_cds_tk4_address 10
#define C_cds_tk5_address 11
//#define C_cds_tk6_address 19
//#define C_cds_tk7_address 20
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_cds_out0_address 5
#define C_cds_out1_address 21
#define C_cds_out2_address 22
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_adc0_address 13
#define C_adc1_address 15
#define C_adc2_address 12
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_cds_rs0_address 14
////////////////////////////////////////////////////////////////////////////////////////////////////
#define C_hwp0_address 16
#define C_hwp1_address 17
#define C_hwp2_address 18
#else
/////////////////////////////////////////
// ýòî äëÿ îñòàëüíûõ ïðîåêòîâ
////////////////////////////////////////
// Ïîäñ÷åò êîëè÷åñòâà ïëàò
//
// äëÿ âûñòàâëåíèÿ àâòîðàçìåð ìàññèâîâ â project.
// íî ò.ê. ãðàíèöó ìàññèâà ñëîæíî ïðîâåðèòü, âîçâðàùàåì â ìàêñèì. âîçìîæíûé ðàçìåð
// ïàìÿòü êóøàåò, íî ëó÷øå òàê âîçìîæíî
//
#define MAX_C_CDS_TK_NUMBER 4 // max 8
#define MAX_C_CDS_IN_NUMBER 3 // max 3
#define MAX_C_CDS_OUT_NUMBER 3 // max 3
#define MAX_C_ADC_NUMBER 2 // max 3
#define MAX_C_HWP_NUMBER 2 // max 3
#define MAX_C_CDS_RS_NUMBER 1 // max 1
/*------------------------------------------------------------------------------
Plane number address
------------------------------------------------------------------------------*/
#define C_controller_address 1
#define C_cds_in0_address 2
#define C_cds_in1_address 3
#define C_cds_in2_address 4
#define C_cds_tk0_address 5
#define C_cds_tk1_address 6
#define C_cds_tk2_address 9
#define C_cds_tk3_address 10
//#define C_cds_tk4_address 255
//#define C_cds_tk5_address 255
//#define C_cds_tk6_address 255
//#define C_cds_tk7_address 255
#define C_cds_out0_address 11
#define C_cds_out1_address 12
#define C_cds_out2_address 13
#define C_adc0_address 7
#define C_adc1_address 8
//#define C_adc2_address 255
#define C_cds_rs0_address 14
#define C_hwp0_address 16
#define C_hwp1_address 17
//#define C_hwp2_address 255
#endif
///////////////////////////////////////////////////////
// òóò àâòî ðàñ÷åò
// êîëè÷åñòâî ïëàò ìîæåò âäðóã ïðåâûñèòü MAX_C_CDS_TK_NUMBER (ñì.âûøå)
// òîãäà ïðîèçâîäèì àâòî ïåðåñ÷åò
///////////////////////////////////////////////////////
#if (MAX_COUNT_PLATES_CDS_TK>MAX_C_CDS_TK_NUMBER)
#define C_cds_tk_number MAX_COUNT_PLATES_CDS_TK // max 8
#else
#define C_cds_tk_number MAX_COUNT_PLATES_CDS_TK // max 8
#endif
#if (MAX_COUNT_PLATES_ADC>MAX_C_ADC_NUMBER)
#define C_adc_number MAX_C_ADC_NUMBER // max 3
#else
#define C_adc_number MAX_COUNT_PLATES_ADC // max 3
#endif
#if (MAX_COUNT_PLATES_HWP>=MAX_C_HWP_NUMBER)
#define C_hwp_number MAX_C_HWP_NUMBER // max 3
#else
#define C_hwp_number MAX_COUNT_PLATES_HWP // max 3
#endif
#if (MAX_COUNT_PLATES_OUT>MAX_C_CDS_OUT_NUMBER)
#define C_cds_out_number MAX_C_CDS_OUT_NUMBER // max 3
#else
#define C_cds_out_number MAX_COUNT_PLATES_OUT // max 3
#endif
#if (MAX_COUNT_PLATES_IN>MAX_C_CDS_IN_NUMBER)
#define C_cds_in_number MAX_C_CDS_IN_NUMBER // max 3
#else
#define C_cds_in_number MAX_COUNT_PLATES_IN // max 3
#endif
#if (MAX_COUNT_PLATES_CDS_RS>MAX_C_CDS_RS_NUMBER)
#define C_cds_rs_number MAX_COUNT_PLATES_CDS_RS // max 1
#else
#define C_cds_rs_number MAX_COUNT_PLATES_CDS_RS // max 1
#endif
//#define C_cds_in_number MAX_C_CDS_IN_NUMBER // max 3
//#define C_cds_out_number MAX_C_CDS_OUT_NUMBER // max 3
//#define C_cds_rs_number MAX_C_CDS_RS_NUMBER // max 1
#endif // end XP_PLANE_ADR_H