Ignore:
Timestamp:
Nov 25, 1999, 2:35:30 PM (26 years ago)
Author:
ansari
Message:

archediab 27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archediab.sources/c/tache_archeops_bit2.c

    r643 r645  
    2323//
    2424//
    25 //   lit directement les blocks recut sur la fifo et les envoie au programme principal
     25//   lit directement les blocks recus sur la fifo et les envoie au programme principal
    2626//
    2727
     
    3434
    3535//*****************************************************************************************
     36unsigned long   N_total_bits,M;
     37unsigned short  Max,Min;
    3638
    3739void init_tache(void)
     
    6971
    7072
    71 char    un_bit(void)
     73char    un_bit()
    7274{
    7375static int i;
    7476static unsigned long RR;
     77unsigned short  Val;
     78
    7579lit_carte;      if(rien_a_lire)         return(bit_vide);       //  fifo vide  ->  retour  ->  sort du while
     80
     81N_total_bits++;
     82Val=((RR>>1) & 0x3f);   //permet de lire les bits de temps dans RR
     83
     84//Calcul de la nouvelle moyenne glissee du temps
     85M=M-(M>>16)+(Val<<8);
     86
     87       
     88//Calcul du Max
     89if(N_total_bits==0) Max=Val;    //initialisation au premier passage
     90if(Val>Max) Max=Val;    //changement de maximum
     91if((N_total_bits%60000)==0)
     92{
     93        Max=Max-1;      //Diminution tous les 60000 bits
     94        N_total_bits=0;
     95}
     96       
     97//Calcul du Min
     98if(N_total_bits==0) Min=Val;    //initialisation au premier passage
     99if(Val<Min) Min=Val;    //changement de minimum
     100if((N_total_bits%60000)==0) Min=Min+1;  //Augmentation tous les 60000 bits
     101//tt->nb_lec_fofo_ext=M;
     102
     103
     104       
    76105//if( RR & 1 )          return(bit_un);
    77106//else          return(bit_zero);
    78107if( RR & 1 )    return(bit_zero);
    79108else            return(bit_un);
     109
    80110}
    81111
     
    135165        }
    136166if(lec_fifo > tt->nb_lec_fofo_int)      tt->nb_lec_fofo_int=lec_fifo;
    137 if(!tt->nb_lec_fofo_ext)                {tt->nb_lec_fofo_ext=tt->nb_lec_fofo_int;tt->nb_lec_fofo_int=0;}
     167//if(!tt->nb_lec_fofo_ext)              {tt->nb_lec_fofo_ext=tt->nb_lec_fofo_int;tt->nb_lec_fofo_int=0;}
    138168
    139169}
Note: See TracChangeset for help on using the changeset viewer.