Projet

Général

Profil

« Précédent | Suivant » 

Révision 206

Ajouté par gamatteozz il y a plus de 6 ans

distance recupere grace a la fonction de tri

Voir les différences:

branch/matteozzi/Emb_App/programme_principal_etud.c
retour=reponse.data.val; */
void dist_tel(){
while(1){
requete.data.id='U';
requete.data.rtr=1;
periph[ADDR('U')].ev=0x02;
snd_dtq(CanTx, requete.msg);
rcv_dtq(CanRx, &reponse.msg);
distance=reponse.data.val;
wai_flg(ev_periph, 0x02, TWF_ANDW, &flag);
distance=periph[ADDR('U')].val; //recupere la valeur de l'angle dans retour
}
}
void main()
......
sta_cyc(ID_acqui);
sta_tsk(ID_periph_rx);
sta_tsk(ID_tourelle);
// sta_tsk(ID_dist-tel);
sta_tsk(ID_distance);
while(1)
{
LED_J=1;
LED_J=0;
commande(20);
}
commande(0);
}
}
void acqui()
branch/matteozzi/Emb_App/conf_noyau.cfg
//
// kernel.cfg : building file for MR308 Ver.4.00
//
// Generated by M3T-MR308 GUI Configurator at 2018/12/11 15:16:48
// Generated by M3T-MR308 GUI Configurator at 2018/12/11 16:26:27
//
////////////////////////////////////////////////////////////////////////////////
// system definition
system{
stack_size = 256;
priority = 10;
priority = 11;
system_IPL = 4;
message_pri = 1;
timeout = YES;
......
// max definition
maxdefine{
max_task = 4;
max_task = 5;
max_flag = 3;
max_dtq = 2;
max_cyh = 1;
......
initial_start = OFF;
exinf = 0x0;
};
task[]{
entry_address = dist_tel();
name = ID_distance;
stack_size = 256;
stack_section = stack;
priority = 11;
initial_start = OFF;
exinf = 0x0;
};
flag[]{
name = ev_bus_fin_tr;

Formats disponibles : Unified diff