Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
I2C functionality. More...
#include "mcu_periph/i2c.h"
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <errno.h>
#include <pthread.h>
#include "rt_priority.h"
Go to the source code of this file.
Data Structures | |
struct | i2c_thread_t |
Macros | |
#define | I2C_THREAD_PRIO 10 |
Functions | |
static bool | i2c_linux_idle (struct i2c_periph *p) |
static bool | i2c_linux_submit (struct i2c_periph *p, struct i2c_transaction *t) |
static void | i2c_linux_setbitrate (struct i2c_periph *p, int bitrate) |
static void * | i2c_thread (void *thread_data) |
static void UNUSED | i2c_arch_init (struct i2c_periph *p) |
void | i2c_event (void) |
i2c_event() function More... | |
I2C functionality.
Definition in file i2c_arch.c.
struct i2c_thread_t |
Definition at line 54 of file i2c_arch.c.
Data Fields | ||
---|---|---|
pthread_cond_t | condition | |
pthread_mutex_t | mutex |
#define I2C_THREAD_PRIO 10 |
Definition at line 42 of file i2c_arch.c.
Referenced by i2c_thread().
|
static |
Definition at line 59 of file i2c_arch.c.
References i2c_thread().
|
static |
Definition at line 79 of file i2c_arch.c.
|
static |
Definition at line 75 of file i2c_arch.c.
|
static |
Definition at line 84 of file i2c_arch.c.
References i2c_thread_t::condition, i2c_periph::errors, I2C_TRANSACTION_QUEUE_LEN, I2CTransFailed, I2CTransPending, i2c_periph::init_struct, mutex, i2c_errors::queue_full_cnt, i2c_transaction::status, i2c_periph::trans, i2c_periph::trans_extract_idx, and i2c_periph::trans_insert_idx.
|
static |
Definition at line 119 of file i2c_arch.c.
References i2c_errors::ack_fail_cnt, i2c_msg::addr, i2c_errors::arb_lost_cnt, i2c_msg::buf, i2c_thread_t::condition, i2c_periph::errors, fd, i2c_msg::flags, get_rt_prio(), I2C_M_RD, I2C_RDWR, I2C_SLAVE, I2C_THREAD_PRIO, I2C_TRANSACTION_QUEUE_LEN, I2CTransFailed, I2CTransRx, I2CTransSuccess, I2CTransTx, I2CTransTxRx, i2c_periph::init_struct, i2c_msg::len, i2c_errors::miss_start_stop_cnt, mutex, p, i2c_periph::reg_addr, i2c_periph::trans, i2c_periph::trans_extract_idx, and i2c_periph::trans_insert_idx.
Referenced by i2c_arch_init().