NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <platform.h>
#include "build_config.h"
#include "gpio.h"
#include "system.h"
#include "bus_i2c.h"
Macros | |
#define | I2C1_SCL_GPIO GPIOB |
#define | I2C1_SCL_GPIO_AF GPIO_AF_4 |
#define | I2C1_SCL_PIN GPIO_Pin_6 |
#define | I2C1_SCL_PIN_SOURCE GPIO_PinSource6 |
#define | I2C1_SCL_CLK_SOURCE RCC_AHBPeriph_GPIOB |
#define | I2C1_SDA_GPIO GPIOB |
#define | I2C1_SDA_GPIO_AF GPIO_AF_4 |
#define | I2C1_SDA_PIN GPIO_Pin_7 |
#define | I2C1_SDA_PIN_SOURCE GPIO_PinSource7 |
#define | I2C1_SDA_CLK_SOURCE RCC_AHBPeriph_GPIOB |
#define | I2C2_SCL_GPIO GPIOF |
#define | I2C2_SCL_GPIO_AF GPIO_AF_4 |
#define | I2C2_SCL_PIN GPIO_Pin_6 |
#define | I2C2_SCL_PIN_SOURCE GPIO_PinSource6 |
#define | I2C2_SCL_CLK_SOURCE RCC_AHBPeriph_GPIOF |
#define | I2C2_SDA_GPIO GPIOA |
#define | I2C2_SDA_GPIO_AF GPIO_AF_4 |
#define | I2C2_SDA_PIN GPIO_Pin_10 |
#define | I2C2_SDA_PIN_SOURCE GPIO_PinSource10 |
#define | I2C2_SDA_CLK_SOURCE RCC_AHBPeriph_GPIOA |
Functions | |
void | i2cSetOverclock (uint8_t OverClock) |
void | i2cInit (I2CDevice index) |
uint16_t | i2cGetErrorCounter (void) |
bool | i2cWrite (uint8_t addr_, uint8_t reg, uint8_t data) |
bool | i2cRead (uint8_t addr_, uint8_t reg, uint8_t len, uint8_t *buf) |
#define I2C1_SCL_CLK_SOURCE RCC_AHBPeriph_GPIOB |
#define I2C1_SCL_GPIO GPIOB |
#define I2C1_SCL_GPIO_AF GPIO_AF_4 |
#define I2C1_SCL_PIN GPIO_Pin_6 |
#define I2C1_SCL_PIN_SOURCE GPIO_PinSource6 |
#define I2C1_SDA_CLK_SOURCE RCC_AHBPeriph_GPIOB |
#define I2C1_SDA_GPIO GPIOB |
#define I2C1_SDA_GPIO_AF GPIO_AF_4 |
#define I2C1_SDA_PIN GPIO_Pin_7 |
#define I2C1_SDA_PIN_SOURCE GPIO_PinSource7 |
#define I2C2_SCL_CLK_SOURCE RCC_AHBPeriph_GPIOF |
#define I2C2_SCL_GPIO GPIOF |
#define I2C2_SCL_GPIO_AF GPIO_AF_4 |
#define I2C2_SCL_PIN GPIO_Pin_6 |
#define I2C2_SCL_PIN_SOURCE GPIO_PinSource6 |
#define I2C2_SDA_CLK_SOURCE RCC_AHBPeriph_GPIOA |
#define I2C2_SDA_GPIO GPIOA |
#define I2C2_SDA_GPIO_AF GPIO_AF_4 |
#define I2C2_SDA_PIN GPIO_Pin_10 |
#define I2C2_SDA_PIN_SOURCE GPIO_PinSource10 |
uint16_t i2cGetErrorCounter | ( | void | ) |
void i2cInit | ( | I2CDevice | index | ) |
bool i2cRead | ( | uint8_t | addr_, |
uint8_t | reg, | ||
uint8_t | len, | ||
uint8_t * | buf | ||
) |
void i2cSetOverclock | ( | uint8_t | OverClock | ) |
bool i2cWrite | ( | uint8_t | addr_, |
uint8_t | reg, | ||
uint8_t | data | ||
) |