Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
spi_arch.c File Reference
#include "subsystems/imu.h"
#include <stm32/gpio.h>
#include <stm32/misc.h>
#include <stm32/rcc.h>
#include <stm32/exti.h>
#include <stm32/spi.h>
#include <stm32/dma.h>
#include "mcu_periph/spi.h"
+ Include dependency graph for spi_arch.c:

Go to the source code of this file.

Macros

#define Spi2Slave0Unselect()   GPIOB->BSRR = GPIO_Pin_12
 
#define Spi2Slave0Select()   GPIOB->BRR = GPIO_Pin_12
 

Functions

void dma1_c4_irq_handler (void)
 
void spi_arch_int_enable (void)
 handling of stm32 SPI hardware More...
 
void spi_arch_int_disable (void)
 
void spi_init (void)
 
void spi_rw (struct spi_transaction *_trans)
 

Variables

struct spi_transaction * slave0
 

Macro Definition Documentation

#define Spi2Slave0Select ( )    GPIOB->BRR = GPIO_Pin_12

Definition at line 14 of file spi_arch.c.

Referenced by spi_rw().

#define Spi2Slave0Unselect ( )    GPIOB->BSRR = GPIO_Pin_12

Definition at line 13 of file spi_arch.c.

Referenced by dma1_c4_irq_handler(), and spi_init().

Function Documentation

void dma1_c4_irq_handler ( void  )

Definition at line 165 of file spi_arch.c.

References slave0, Spi2Slave0Unselect, spi_message_received, and TRUE.

void spi_arch_int_disable ( void  )

Definition at line 32 of file spi_arch.c.

void spi_arch_int_enable ( void  )

handling of stm32 SPI hardware

Definition at line 20 of file spi_arch.c.

Referenced by spi_init().

+ Here is the caller graph for this function:

void spi_init ( void  )

Definition at line 43 of file spi_arch.c.

References Spi2Slave0Unselect, and spi_arch_int_enable().

+ Here is the call graph for this function:

void spi_rw ( struct spi_transaction *  _trans)

Definition at line 106 of file spi_arch.c.

References slave0, and Spi2Slave0Select.

Referenced by imu_periodic(), mpu_set(), and mpu_wait_slave4_ready().

+ Here is the caller graph for this function:

Variable Documentation

struct spi_transaction* slave0

Definition at line 104 of file spi_arch.c.

Referenced by dma1_c4_irq_handler(), and spi_rw().