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
sc18is600_arch.c File Reference
#include "peripherals/sc18is600.h"
#include <stm32/rcc.h>
#include <stm32/spi.h>
#include <stm32/exti.h>
#include <stm32/misc.h>
#include <stm32/dma.h>
#include <stm32/gpio.h>
+ Include dependency graph for sc18is600_arch.c:

Go to the source code of this file.

Macros

#define Sc18Is600_Cmd_Write   0x00
 
#define Sc18Is600_Cmd_Read   0x01
 
#define Sc18Is600_Cmd_Read_After_Write   0x02
 
#define Sc18Is600_Cmd_Write_After_Write   0x03
 
#define Sc18Is600_Cmd_Read_Buffer   0x06
 
#define Sc18Is600_Cmd_Write_To_Reg   0x20
 
#define Sc18Is600_Cmd_Read_From_Reg   0x21
 
#define Sc18Is600_Cmd_Power_Down   0x30
 
#define ReadI2CStatReg()
 

Functions

void exti2_irq_handler (void)
 
void dma1_c4_irq_handler (void)
 
static void sc18is600_setup_SPI_DMA (uint8_t _len)
 
void sc18is600_arch_init (void)
 
void sc18is600_transmit (uint8_t addr, uint8_t len)
 
void sc18is600_receive (uint8_t addr, uint8_t len)
 
void sc18is600_tranceive (uint8_t addr, uint8_t len_tx, uint8_t len_rx)
 
void sc18is600_write_to_register (uint8_t addr, uint8_t value)
 
void sc18is600_read_from_register (uint8_t addr)
 

Macro Definition Documentation

#define ReadI2CStatReg ( )
Value:
{ \
}
#define Sc18Is600_I2CStat
Definition: sc18i600.h:11
uint8_t priv_tx_buf[SC18IS600_BUF_LEN]
Definition: sc18i600.h:36
static void sc18is600_setup_SPI_DMA(uint8_t _len)
struct Sc18Is600 sc18is600
Definition: sc18i600.c:3
#define Sc18Is600_Cmd_Read_From_Reg
#define Sc18Is600Select()
Definition: sc18is600_arch.h:5

Definition at line 199 of file sc18is600_arch.c.

Referenced by exti2_irq_handler().

#define Sc18Is600_Cmd_Power_Down   0x30

Definition at line 18 of file sc18is600_arch.c.

#define Sc18Is600_Cmd_Read   0x01

Definition at line 12 of file sc18is600_arch.c.

#define Sc18Is600_Cmd_Read_After_Write   0x02

Definition at line 13 of file sc18is600_arch.c.

Referenced by sc18is600_tranceive().

#define Sc18Is600_Cmd_Read_Buffer   0x06

Definition at line 15 of file sc18is600_arch.c.

Referenced by dma1_c4_irq_handler().

#define Sc18Is600_Cmd_Read_From_Reg   0x21

Definition at line 17 of file sc18is600_arch.c.

Referenced by sc18is600_read_from_register().

#define Sc18Is600_Cmd_Write   0x00

Definition at line 11 of file sc18is600_arch.c.

Referenced by sc18is600_transmit().

#define Sc18Is600_Cmd_Write_After_Write   0x03

Definition at line 14 of file sc18is600_arch.c.

#define Sc18Is600_Cmd_Write_To_Reg   0x20

Definition at line 16 of file sc18is600_arch.c.

Referenced by sc18is600_write_to_register().

Function Documentation

void sc18is600_arch_init ( void  )

Definition at line 25 of file sc18is600_arch.c.

References Sc18Is600Unselect.

Referenced by sc18is600_init().

+ Here is the caller graph for this function:

void sc18is600_read_from_register ( uint8_t  addr)

Definition at line 189 of file sc18is600_arch.c.

References Sc18Is600::priv_tx_buf, sc18is600, Sc18Is600_Cmd_Read_From_Reg, sc18is600_setup_SPI_DMA(), Sc18Is600ReadRegister, Sc18Is600Select, Sc18Is600SendingRequest, Sc18Is600::status, and Sc18Is600::transaction.

Referenced by main_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sc18is600_receive ( uint8_t  addr,
uint8_t  len 
)

Definition at line 161 of file sc18is600_arch.c.

static void sc18is600_setup_SPI_DMA ( uint8_t  _len)
inlinestatic
void sc18is600_tranceive ( uint8_t  addr,
uint8_t  len_tx,
uint8_t  len_rx 
)

Definition at line 165 of file sc18is600_arch.c.

References Sc18Is600::priv_tx_buf, Sc18Is600::rx_len, sc18is600, Sc18Is600_Cmd_Read_After_Write, sc18is600_setup_SPI_DMA(), Sc18Is600Select, Sc18Is600SendingRequest, Sc18Is600Transcieve, Sc18Is600::status, and Sc18Is600::transaction.

Referenced by main_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sc18is600_transmit ( uint8_t  addr,
uint8_t  len 
)

Definition at line 149 of file sc18is600_arch.c.

References Sc18Is600::priv_tx_buf, sc18is600, Sc18Is600_Cmd_Write, sc18is600_setup_SPI_DMA(), Sc18Is600Select, Sc18Is600SendingRequest, Sc18Is600Transmit, Sc18Is600::status, and Sc18Is600::transaction.

Referenced by main_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sc18is600_write_to_register ( uint8_t  addr,
uint8_t  value 
)

Definition at line 178 of file sc18is600_arch.c.

References Sc18Is600::priv_tx_buf, sc18is600, Sc18Is600_Cmd_Write_To_Reg, sc18is600_setup_SPI_DMA(), Sc18Is600Select, Sc18Is600SendingRequest, Sc18Is600WriteRegister, Sc18Is600::status, and Sc18Is600::transaction.

Referenced by main_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: