APM:Libraries
Macros | Functions | Variables
tim_i2c.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include "tim_i2c.h"
#include <stdio.h>
#include <i2c.h>
Include dependency graph for tim_i2c.cpp:

Go to the source code of this file.

Macros

#define SCL_H   {scl_port->BSRRL = scl_pin; }
 
#define SCL_L   {scl_port->BSRRH = scl_pin; }
 
#define SDA_H   {sda_port->BSRRL = sda_pin; }
 
#define SDA_L   {sda_port->BSRRH = sda_pin; }
 
#define SCL_read   ((scl_port->IDR & scl_pin)!=0)
 
#define SDA_read   ((sda_port->IDR & sda_pin)!=0)
 
#define I2C_yield(x)   hal_yield(x)
 
#define SI2C_BIT_TIME   8
 
#define SI2C_PERIOD   2
 
#define MAX_I2C_TIME   300
 

Functions

static void delay_10us ()
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Macro Definition Documentation

◆ I2C_yield

#define I2C_yield (   x)    hal_yield(x)

Definition at line 88 of file tim_i2c.cpp.

◆ MAX_I2C_TIME

#define MAX_I2C_TIME   300

Definition at line 565 of file tim_i2c.cpp.

Referenced by Soft_I2C::bus_reset().

◆ SCL_H

#define SCL_H   {scl_port->BSRRL = scl_pin; }

◆ SCL_L

#define SCL_L   {scl_port->BSRRH = scl_pin; }

Definition at line 80 of file tim_i2c.cpp.

Referenced by Soft_I2C::bus_reset(), Soft_I2C::tick(), and Soft_I2C::wait_done().

◆ SCL_read

#define SCL_read   ((scl_port->IDR & scl_pin)!=0)

◆ SDA_H

#define SDA_H   {sda_port->BSRRL = sda_pin; }

◆ SDA_L

#define SDA_L   {sda_port->BSRRH = sda_pin; }

Definition at line 83 of file tim_i2c.cpp.

Referenced by Soft_I2C::bus_reset(), Soft_I2C::tick(), and Soft_I2C::wait_done().

◆ SDA_read

#define SDA_read   ((sda_port->IDR & sda_pin)!=0)

◆ SI2C_BIT_TIME

#define SI2C_BIT_TIME   8

Definition at line 90 of file tim_i2c.cpp.

Referenced by Soft_I2C::wait_done().

◆ SI2C_PERIOD

#define SI2C_PERIOD   2

Referenced by Soft_I2C::_start().

Function Documentation

◆ delay_10us()

static void delay_10us ( )
static

Definition at line 102 of file tim_i2c.cpp.

Referenced by Soft_I2C::bus_reset().

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

Variable Documentation

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.