Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
test_spi_slave2.c File Reference
#include <stm32/flash.h>
#include <stm32/misc.h>
#include <stm32/spi.h>
#include <stm32/dma.h>
#include <BOARD_CONFIG>
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/datalink/downlink.h"
#include "fms/fms_autopilot_msg.h"
#include "led.h"
+ Include dependency graph for test_spi_slave2.c:

Go to the source code of this file.

Macros

#define USE_DMA   1
 
#define BufferSize   sizeof(struct AutopilotMessageFoo)
 

Functions

static void main_init (void)
 
static void main_periodic_task (void)
 
static void main_event_task (void)
 
static void main_spi_slave_init (void)
 
static void main_setup_dma (void)
 
static void main_enable_dma (void)
 
int main (void)
 
void spi1_dma_irq_handler (void)
 

Variables

uint8_t SPI_SLAVE_Buffer_Rx [BufferSize]
 
uint8_t SPI_SLAVE_Buffer_Tx [BufferSize]
 

Macro Definition Documentation

#define BufferSize   sizeof(struct AutopilotMessageFoo)

Definition at line 40 of file test_spi_slave2.c.

Referenced by main_event_task(), and main_setup_dma().

#define USE_DMA   1

Definition at line 38 of file test_spi_slave2.c.

Function Documentation

int main ( void  )

Definition at line 47 of file test_spi_slave2.c.

References main_event_task(), main_init(), main_periodic_task(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

static void main_enable_dma ( void  )
static

Definition at line 161 of file test_spi_slave2.c.

References SPI1.

Referenced by main_event_task(), and main_spi_slave_init().

+ Here is the caller graph for this function:

static void main_event_task ( void  )
inlinestatic

Definition at line 75 of file test_spi_slave2.c.

References BufferSize, DefaultChannel, DefaultDevice, LED_TOGGLE, main_enable_dma(), main_setup_dma(), SPI_SLAVE_Buffer_Rx, and SPI_SLAVE_Buffer_Tx.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_init ( void  )
inlinestatic

Definition at line 60 of file test_spi_slave2.c.

References main_spi_slave_init(), mcu_init(), PERIODIC_FREQUENCY, and sys_time_register_timer().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_periodic_task ( void  )
inlinestatic

Definition at line 66 of file test_spi_slave2.c.

References DefaultChannel, DefaultDevice, LED_PERIODIC, and sys_time::nb_sec.

Referenced by main().

+ Here is the caller graph for this function:

static void main_setup_dma ( void  )
static

Definition at line 136 of file test_spi_slave2.c.

References BufferSize, SPI_SLAVE_Buffer_Rx, and SPI_SLAVE_Buffer_Tx.

Referenced by main_event_task(), and main_spi_slave_init().

+ Here is the caller graph for this function:

static void main_spi_slave_init ( void  )
inlinestatic

Definition at line 91 of file test_spi_slave2.c.

References main_enable_dma(), main_setup_dma(), and SPI1.

Referenced by main_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void spi1_dma_irq_handler ( void  )

Definition at line 185 of file test_spi_slave2.c.

References LED_TOGGLE.

Variable Documentation

uint8_t SPI_SLAVE_Buffer_Rx[BufferSize]

Definition at line 41 of file test_spi_slave2.c.

Referenced by main_event_task(), and main_setup_dma().

uint8_t SPI_SLAVE_Buffer_Tx[BufferSize]

Definition at line 42 of file test_spi_slave2.c.

Referenced by main_event_task(), and main_setup_dma().