Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
qr_code_spi_link.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2013 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
23 #include "qr_code_spi_link.h"
24 
25 #include "subsystems/imu.h"
26 #include "mcu_periph/spi.h"
27 
28 #include "mcu_periph/uart.h"
29 #include "messages.h"
31 
32 //struct qr_code_spi_link_data qr_code_spi_link_data;
34 
35 static volatile bool_t qr_code_spi_data_available = FALSE;
36 
37 uint8_t testDataOut[3] = {1,2,3};
38 uint8_t testDataIn[3] = {9,9,9};
39 
40 static void qr_code_spi_link_trans_cb( struct spi_transaction *trans );
41 
52  //spi_slave_set_config(&spi1, &qr_code_spi_link_transaction);
54 }
55 
56 
60  uint16_t x,y;
63  DOWNLINK_SEND_VISUALTARGET(DefaultChannel, DefaultDevice, &x, &y);
65  }
66 }
67 
68 static void qr_code_spi_link_trans_cb( struct spi_transaction *trans __attribute__ ((unused)) ) {
70 }
71 
72 
enum SPIBitOrder bitorder
MSB/LSB order.
Definition: spi.h:152
unsigned short uint16_t
Definition: types.h:16
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
enum SPIClockPolarity cpol
clock polarity control
Definition: spi.h:149
uint8_t input_length
number of data words to read
Definition: spi.h:145
enum SPIClockPhase cpha
clock phase control
Definition: spi.h:150
CPHA = 1.
Definition: spi.h:69
volatile uint8_t * input_buf
pointer to receive buffer for DMA
Definition: spi.h:143
CPOL = 1.
Definition: spi.h:78
#define FALSE
Definition: imu_chimu.h:141
Architecture independent SPI (Serial Peripheral Interface) API.
Definition: spi.h:84
enum SPIDataSizeSelect dss
data transfer word size
Definition: spi.h:151
uint8_t output_length
number of data words to write
Definition: spi.h:146
Inertial Measurement Unit interface.
#define TRUE
Definition: imu_chimu.h:144
bool_t spi_slave_register(struct spi_periph *p, struct spi_transaction *t)
Register one (and only one) transaction to use spi as slave.
Definition: spi_arch.c:648
unsigned char uint8_t
Definition: types.h:14
SPI transaction structure.
Definition: spi.h:142
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
Definition: spi.h:144
process_rx_dma_interrupt & spi1
receive transferred over DMA
Definition: spi_arch.c:961
SPICallback after_cb
NULL or function called after the transaction.
Definition: spi.h:155