Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
i2c_arch.c File Reference

Handling of I2C hardware for LPC21xx. More...

#include "mcu_periph/i2c.h"
#include "std.h"
#include "interrupt_hw.h"
#include <BOARD_CONFIG>
+ Include dependency graph for i2c_arch.c:

Go to the source code of this file.

Functions

static void I2cSendStart (struct i2c_periph *p)
 
static void I2cSendAck (void *reg)
 
static void I2cEndOfTransaction (struct i2c_periph *p)
 
static void I2cSendStop (struct i2c_periph *p, struct i2c_transaction *t)
 
static void I2cFail (struct i2c_periph *p, struct i2c_transaction *t)
 
static void I2cSendByte (void *reg, uint8_t b)
 
static void I2cReceive (void *reg, bool_t ack)
 
static void I2cClearStart (void *reg)
 
static void I2cClearIT (void *reg)
 
static void I2cAutomaton (int32_t state, struct i2c_periph *p)
 
bool_t i2c_idle (struct i2c_periph *p)
 Check if I2C bus is idle. More...
 
bool_t i2c_submit (struct i2c_periph *p, struct i2c_transaction *t)
 Submit a I2C transaction. More...
 
void i2c_event (void)
 
void i2c_setbitrate (struct i2c_periph *p, int bitrate)
 Set I2C bitrate. More...
 

Detailed Description

Handling of I2C hardware for LPC21xx.

Definition in file i2c_arch.c.

Function Documentation

static void I2cClearIT ( void *  reg)
inlinestatic

Definition at line 91 of file i2c_arch.c.

References SIC.

static void I2cClearStart ( void *  reg)
inlinestatic

Definition at line 87 of file i2c_arch.c.

References STAC.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

static void I2cEndOfTransaction ( struct i2c_periph p)
inlinestatic

Definition at line 49 of file i2c_arch.c.

References I2C_TRANSACTION_QUEUE_LEN, I2CIdle, and I2cSendStart().

Referenced by I2cFail(), and I2cSendStop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void I2cFail ( struct i2c_periph p,
struct i2c_transaction t 
)
inlinestatic

Definition at line 70 of file i2c_arch.c.

References I2cEndOfTransaction(), I2CTransFailed, and STO.

Referenced by I2cAutomaton().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void I2cReceive ( void *  reg,
bool_t  ack 
)
inlinestatic

Definition at line 82 of file i2c_arch.c.

References AA, and AAC.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

static void I2cSendAck ( void *  reg)
inlinestatic

Definition at line 45 of file i2c_arch.c.

References AA.

static void I2cSendByte ( void *  reg,
uint8_t  b 
)
inlinestatic

Definition at line 78 of file i2c_arch.c.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

static void I2cSendStart ( struct i2c_periph p)
inlinestatic

Definition at line 40 of file i2c_arch.c.

References I2CStartRequested, and STA.

Referenced by i2c_submit(), I2cAutomaton(), and I2cEndOfTransaction().

+ Here is the caller graph for this function:

static void I2cSendStop ( struct i2c_periph p,
struct i2c_transaction t 
)
inlinestatic

Definition at line 63 of file i2c_arch.c.

References I2cEndOfTransaction(), I2CTransSuccess, and STO.

Referenced by I2cAutomaton().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: