Atmel AVR2070 Manual de usuario Pagina 45

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 59
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 44
A Anhang
A.1 Listings
1 /* * * ** * *** *** *** *** *** *** * ** * ** * *** *** *
2 copyright ( c) 2007 Axel Wachtler
3 modified by Mirco Kern , FH Duess e ldorf
4 * ** * ** * *** *** *** *** *** *** *** *** * ** * ** * */
5
6 /* exampl e : receiving frames */
7 /* ** *** **** *** * *** *** * *** *** * */
8
9 /* includ e header files */
10 # inclu de " board .h"
11 # inclu de " tra n sceiver .h "
12 # inclu de " ioutil . h"
13 # inclu de < util / crc16 .h >
14 # inclu de " xmpl .h"
15
16
17 /* variable storing received frame */
18 static uint8_t rxfrm [ MAX _ FRAME _ SIZE ];
19
20 int main ( void )
21 {
22 /* initialize leds ( red switched on ) */
23 LED_INIT ();
24
25 /* initialize the trans c eiver */
26 DELAY_US ( TR X_INI T _TIM E _US );
27 TRX _ RESET_ L OW ();
28 TRX _ SLPTR_ L OW ();
29 DELAY_US ( TR X_RE S ET_T I ME_U S );
30 TRX _ RESET _ HIGH ();
31 trx _ reg_wr i te ( RG_TRX_STATE , CMD_TRX _ OFF );
32 DELAY_US ( TR X_INI T _TIM E _US );
33
34 /* setup transmi t ter
35 * - c o n f i gure radio c hannel
36 * - go into rx state ,
37 * - enable " receive end " irq
38 */
40
Vista de pagina 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 58 59

Comentarios a estos manuales

Sin comentarios