Revision 142 branch/fichot/Emb_App/programme_principal_etud.c

View differences:

programme_principal_etud.c
121 121
//				correspondant au nom du v?hicule si le nom se termine par '*'
122 122

  
123 123

  
124

  
125
void vit_rot()
126
{
127
CanFrame comm;
128
comm.data.id = 'T';
129
comm.data.rtr = 0;
130
comm.data.val = 120;
131
snd_dtq(CanTx, comm.msg);
132
}	
133

  
134
	
135
void angle()
136
{	
137
CanFrame req;
138
CanFrame reponse;
139
float alpha;
140
req.data.id = 'R';
141
req.data.rtr = 1;
142
snd_dtq (CanTx,req.msg); 
143

  
144
rcv_dtq(CanRx, &reponse.msg);
145
alpha = reponse.data.val; 
146
	
147
}
148

  
149

  
150

  
151

  
152

  
153

  
154

  
124 155
void main()
125 156
{
126 157
	ports_mcu();
......
133 164
	capture_init();
134 165

  
135 166
	sta_cyc(ID_acqui);
136
//	sta_tsk(ID_periph_rx);
167
	// sta_tsk(ID_periph_rx);
168
	
169
	while(1)
170
	{
171
		LED_J=1;
172
		dly_tsk(100);
173
		LED_J=0;
174
		dly_tsk(100);
175
	}
176
}		
137 177

  
138
    while(1)
139
    {
140
		LED_J=1;
141
		dly_tsk(100);
142
		LED_J=0;
143
		dly_tsk(100);
144
    }
145
}
146

  
147 178
void acqui()
148 179
{
149 180
	LED_V=!LED_V;
150 181
}
151

  
182

  
183

  
184
	 

Also available in: Unified diff