Revision 151 branch/Antourou/Emb_App/programme_principal_etud.c

View differences:

programme_principal_etud.c
124 124
void main()
125 125
{
126 126
	CanFrame comm;
127
	CanFrame requete;
128
	UINT flag;//FLGPTN flag
129
	short position;
127 130
	ports_mcu();
128 131
    lcd_init();
129 132
	periph_init();
......
149 152
		comm.data.val=450;
150 153
		snd_dtq (CanTx,comm.msg);
151 154
		dly_tsk(100);	
155
		//Lecture de la position de la tourelle 
156
		requete.data.id='R';
157
		// Lecture de la requ?te
158
		requete.data.rtr=1;
159
		periph[ADDR('R')].ev=0x01;
160
		snd_dtq(CanTx,requete.msg);
161
		wai_flg (ev_periph, 0x01, TWF_ANDW, &flag);
162
     	position=periph[ADDR('R')].val;
163
		
164
		
152 165
		
153 166
    }
154 167
}
......
157 170
{
158 171
	LED_V=!LED_V;
159 172
}
160

  

Also available in: Unified diff