/*------------------------------------------------------------------------------ -- This file is a part of the LFR Offset analysis firmware -- Copyright (C) 2016, Plasma Physics Laboratory - CNRS -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@lpp.polytechnique.fr ----------------------------------------------------------------------------*/ #include #include #include #include #include #define MS_Size_Int (128 * 25 * 4 / sizeof(int)) #define BUF_SZ 2688 uint16_t WF1[6 * BUF_SZ] __attribute__((aligned(0x100))); uint16_t WF2[6 * BUF_SZ] __attribute__((aligned(0x100))); volatile int todo = 0; volatile int Freq = 0; volatile int PerformReset = 1; volatile int Major; volatile int Minor; volatile int Board; int main(void) { Major = LFR->VERSION.Major; Minor = LFR->VERSION.Minor; Board = LFR->VERSION.Board; while (1) { do{ if(PerformReset) resetLFR(); switch (Freq) { case 0: getSnapShotsF0((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0); break; case 1: getSnapShotsF1((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0); break; case 2: getSnapShotsF2((uint32_t)WF1,(uint32_t)WF2,BUF_SZ,0); break; default: break; } todo--; }while (todo!=0); } return 0; }