Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
sc18i600.h File Reference
#include "std.h"
#include "peripherals/sc18is600_arch.h"
+ Include dependency graph for sc18i600.h:

Go to the source code of this file.

Data Structures

struct  Sc18Is600
 

Macros

#define Sc18Is600_IOConfig   0x00
 
#define Sc18Is600_IOState   0x01
 
#define Sc18Is600_I2CClock   0x02
 
#define Sc18Is600_I2CTO   0x03
 
#define Sc18Is600_I2CStat   0x04
 
#define Sc18Is600_I2CAdr   0x05
 
#define SC18IS600_BUF_LEN   96
 

Enumerations

enum  Sc18Is600Status {
  Sc18Is600Idle , Sc18Is600SendingRequest , Sc18Is600WaitingForI2C , Sc18Is600ReadingI2CStat ,
  Sc18Is600ReadingBuffer , Sc18Is600TransactionComplete
}
 
enum  Sc18Is600Transaction {
  Sc18Is600Transmit , Sc18Is600Receive , Sc18Is600Transcieve , Sc18Is600ReadRegister ,
  Sc18Is600WriteRegister
}
 

Functions

void sc18is600_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)
 
void sc18is600_arch_init (void)
 

Variables

struct Sc18Is600 sc18is600
 

Data Structure Documentation

◆ Sc18Is600

struct Sc18Is600

Definition at line 33 of file sc18i600.h.

Data Fields
uint8_t i2c_status
uint8_t priv_rx_buf[SC18IS600_BUF_LEN]
uint8_t priv_tx_buf[SC18IS600_BUF_LEN]
uint8_t rx_len
enum Sc18Is600Status status
enum Sc18Is600Transaction transaction

Macro Definition Documentation

◆ SC18IS600_BUF_LEN

#define SC18IS600_BUF_LEN   96

Definition at line 31 of file sc18i600.h.

◆ Sc18Is600_I2CAdr

#define Sc18Is600_I2CAdr   0x05

Definition at line 12 of file sc18i600.h.

◆ Sc18Is600_I2CClock

#define Sc18Is600_I2CClock   0x02

Definition at line 9 of file sc18i600.h.

◆ Sc18Is600_I2CStat

#define Sc18Is600_I2CStat   0x04

Definition at line 11 of file sc18i600.h.

◆ Sc18Is600_I2CTO

#define Sc18Is600_I2CTO   0x03

Definition at line 10 of file sc18i600.h.

◆ Sc18Is600_IOConfig

#define Sc18Is600_IOConfig   0x00

Definition at line 7 of file sc18i600.h.

◆ Sc18Is600_IOState

#define Sc18Is600_IOState   0x01

Definition at line 8 of file sc18i600.h.

Enumeration Type Documentation

◆ Sc18Is600Status

Enumerator
Sc18Is600Idle 
Sc18Is600SendingRequest 
Sc18Is600WaitingForI2C 
Sc18Is600ReadingI2CStat 
Sc18Is600ReadingBuffer 
Sc18Is600TransactionComplete 

Definition at line 15 of file sc18i600.h.

◆ Sc18Is600Transaction

Enumerator
Sc18Is600Transmit 
Sc18Is600Receive 
Sc18Is600Transcieve 
Sc18Is600ReadRegister 
Sc18Is600WriteRegister 

Definition at line 24 of file sc18i600.h.

Function Documentation

◆ 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_init()

void sc18is600_init ( void  )

Definition at line 5 of file sc18i600.c.

References sc18is600, sc18is600_arch_init(), Sc18Is600Idle, and Sc18Is600::status.

+ Here is the call 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_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 
)

Variable Documentation

◆ sc18is600