Changeset 645 in Sophya for trunk/Poubelle/archediab.old/archediab.sources/c/tache_archeops_bit2.c
- Timestamp:
- Nov 25, 1999, 2:35:30 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archediab.old/archediab.sources/c/tache_archeops_bit2.c
r643 r645 23 23 // 24 24 // 25 // lit directement les blocks recu tsur la fifo et les envoie au programme principal25 // lit directement les blocks recus sur la fifo et les envoie au programme principal 26 26 // 27 27 … … 34 34 35 35 //***************************************************************************************** 36 unsigned long N_total_bits,M; 37 unsigned short Max,Min; 36 38 37 39 void init_tache(void) … … 69 71 70 72 71 char un_bit( void)73 char un_bit() 72 74 { 73 75 static int i; 74 76 static unsigned long RR; 77 unsigned short Val; 78 75 79 lit_carte; if(rien_a_lire) return(bit_vide); // fifo vide -> retour -> sort du while 80 81 N_total_bits++; 82 Val=((RR>>1) & 0x3f); //permet de lire les bits de temps dans RR 83 84 //Calcul de la nouvelle moyenne glissee du temps 85 M=M-(M>>16)+(Val<<8); 86 87 88 //Calcul du Max 89 if(N_total_bits==0) Max=Val; //initialisation au premier passage 90 if(Val>Max) Max=Val; //changement de maximum 91 if((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 98 if(N_total_bits==0) Min=Val; //initialisation au premier passage 99 if(Val<Min) Min=Val; //changement de minimum 100 if((N_total_bits%60000)==0) Min=Min+1; //Augmentation tous les 60000 bits 101 //tt->nb_lec_fofo_ext=M; 102 103 104 76 105 //if( RR & 1 ) return(bit_un); 77 106 //else return(bit_zero); 78 107 if( RR & 1 ) return(bit_zero); 79 108 else return(bit_un); 109 80 110 } 81 111 … … 135 165 } 136 166 if(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;} 138 168 139 169 }
Note:
See TracChangeset
for help on using the changeset viewer.