Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ ReadI2CStatReg

#define ReadI2CStatReg ( )
Value:
{ \
sc18is600.priv_tx_buf[0] = Sc18Is600_Cmd_Read_From_Reg; \
sc18is600.priv_tx_buf[1] = Sc18Is600_I2CStat; \
sc18is600.priv_tx_buf[2] = 0; \
Sc18Is600Select(); \
sc18is600_setup_SPI_DMA(3); \
}
#define Sc18Is600_I2CStat
Definition: sc18i600.h:11
#define Sc18Is600_Cmd_Read_From_Reg

Definition at line 206 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Power_Down

#define Sc18Is600_Cmd_Power_Down   0x30

Definition at line 18 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Read

#define Sc18Is600_Cmd_Read   0x01

Definition at line 12 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Read_After_Write

#define Sc18Is600_Cmd_Read_After_Write   0x02

Definition at line 13 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Read_Buffer

#define Sc18Is600_Cmd_Read_Buffer   0x06

Definition at line 15 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Read_From_Reg

#define Sc18Is600_Cmd_Read_From_Reg   0x21

Definition at line 17 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Write

#define Sc18Is600_Cmd_Write   0x00

Definition at line 11 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Write_After_Write

#define Sc18Is600_Cmd_Write_After_Write   0x03

Definition at line 14 of file sc18is600_arch.c.

◆ Sc18Is600_Cmd_Write_To_Reg

#define Sc18Is600_Cmd_Write_To_Reg   0x20

Definition at line 16 of file sc18is600_arch.c.

Function Documentation

◆ dma1_c4_irq_handler()

◆ exti2_irq_handler()

◆ sc18is600_arch_init()

void sc18is600_arch_init ( void  )

Definition at line 25 of file sc18is600_arch.c.

References GPIOB, GPIOD, and Sc18Is600Unselect.

Referenced by sc18is600_init().

+ Here is the caller graph for this function:

◆ sc18is600_read_from_register()

void sc18is600_read_from_register ( uint8_t  addr)

◆ sc18is600_receive()

void sc18is600_receive ( uint8_t  addr,
uint8_t  len 
)

Definition at line 164 of file sc18is600_arch.c.

◆ sc18is600_setup_SPI_DMA()

static void sc18is600_setup_SPI_DMA ( uint8_t  _len)
inlinestatic

◆ sc18is600_tranceive()

void sc18is600_tranceive ( uint8_t  addr,
uint8_t  len_tx,
uint8_t  len_rx 
)

◆ sc18is600_transmit()

void sc18is600_transmit ( uint8_t  addr,
uint8_t  len 
)

◆ sc18is600_write_to_register()

void sc18is600_write_to_register ( uint8_t  addr,
uint8_t  value 
)