Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
i2c_arch.c File Reference
#include "mcu_periph/i2c.h"
#include "std.h"
#include <BOARD_CONFIG>
#include "armVIC.h"
+ Include dependency graph for i2c_arch.c:

Go to the source code of this file.

Functions

static bool i2c_lpc21_idle (struct i2c_periph *p)
 
static bool i2c_lpc21_submit (struct i2c_periph *p, struct i2c_transaction *t)
 
static void i2c_lpc21_setbitrate (struct i2c_periph *p, int bitrate)
 
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 ack)
 
static void I2cClearStart (void *reg)
 
static void I2cClearIT (void *reg)
 
static void I2cAutomaton (int32_t state, struct i2c_periph *p)
 
void i2c_event (void)
 i2c_event() function More...
 

Detailed Description

Handling of I2C hardware for LPC21xx.

Definition in file i2c_arch.c.

Function Documentation

◆ i2c_lpc21_idle()

static bool i2c_lpc21_idle ( struct i2c_periph p)
static

Definition at line 356 of file i2c_arch.c.

References I2CIdle, and p.

◆ i2c_lpc21_setbitrate()

static void i2c_lpc21_setbitrate ( struct i2c_periph p,
int  bitrate 
)
static

Definition at line 398 of file i2c_arch.c.

References p.

◆ i2c_lpc21_submit()

static bool i2c_lpc21_submit ( struct i2c_periph p,
struct i2c_transaction t 
)
static

Definition at line 361 of file i2c_arch.c.

References disableIRQ(), enableIRQ(), I2C_TRANSACTION_QUEUE_LEN, I2CIdle, I2cSendStart(), I2CTransFailed, I2CTransPending, idx, p, and i2c_transaction::status.

+ Here is the call graph for this function:

◆ I2cAutomaton()

◆ I2cClearIT()

static void I2cClearIT ( void *  reg)
inlinestatic

Definition at line 105 of file i2c_arch.c.

References SIC.

◆ I2cClearStart()

static void I2cClearStart ( void *  reg)
inlinestatic

Definition at line 100 of file i2c_arch.c.

References STAC.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

◆ I2cEndOfTransaction()

static void I2cEndOfTransaction ( struct i2c_periph p)
inlinestatic

Definition at line 57 of file i2c_arch.c.

References I2C_TRANSACTION_QUEUE_LEN, I2CIdle, I2cSendStart(), and p.

Referenced by I2cFail(), and I2cSendStop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ I2cFail()

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

Definition at line 80 of file i2c_arch.c.

References I2cEndOfTransaction(), I2CTransFailed, p, i2c_transaction::status, and STO.

Referenced by I2cAutomaton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ I2cReceive()

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

Definition at line 94 of file i2c_arch.c.

References AA, and AAC.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

◆ I2cSendAck()

static void I2cSendAck ( void *  reg)
inlinestatic

Definition at line 52 of file i2c_arch.c.

References AA.

◆ I2cSendByte()

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

Definition at line 89 of file i2c_arch.c.

References b.

Referenced by I2cAutomaton().

+ Here is the caller graph for this function:

◆ I2cSendStart()

static void I2cSendStart ( struct i2c_periph p)
inlinestatic

Definition at line 46 of file i2c_arch.c.

References I2CStartRequested, p, and STA.

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

+ Here is the caller graph for this function:

◆ I2cSendStop()

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

Definition at line 72 of file i2c_arch.c.

References I2cEndOfTransaction(), I2CTransSuccess, p, i2c_transaction::status, and STO.

Referenced by I2cAutomaton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: