dRonin
adbada4
dRonin firmware
|
#include <pios.h>
#include <pios_stm32.h>
#include <stdbool.h>
#include "pios_semaphore.h"
#include "pios_mutex.h"
#include <inttypes.h>
Go to the source code of this file.
Data Structures | |
struct | pios_i2c_adapter_cfg |
Enumerations | |
enum | i2c_adapter_state { I2C_STATE_FSM_FAULT = 0, I2C_STATE_BUS_ERROR, I2C_STATE_STOPPED, I2C_STATE_STARTING, I2C_STATE_TRANSFER_COMPLETE, I2C_STATE_NACK, I2C_STATE_NUM_STATES } |
enum | i2c_adapter_event { I2C_EVENT_AUTO, I2C_EVENT_START, I2C_EVENT_STOP, I2C_EVENT_NACK, I2C_EVENT_BUS_ERROR, I2C_EVENT_STOPPED, I2C_EVENT_NUM_EVENTS } |
enum | pios_i2c_adapter_magic { PIOS_I2C_DEV_MAGIC = 0xa9a9b8b8 } |
enum | pios_i2c_error_type { PIOS_I2C_ERROR_EVENT, PIOS_I2C_ERROR_FSM, PIOS_I2C_ERROR_INTERRUPT } |
Functions | |
int32_t | PIOS_I2C_Init (pios_i2c_t *i2c_id, const struct pios_i2c_adapter_cfg *cfg) |
enum i2c_adapter_event |
Enumerator | |
---|---|
I2C_EVENT_AUTO | |
I2C_EVENT_START | |
I2C_EVENT_STOP | |
I2C_EVENT_NACK | |
I2C_EVENT_BUS_ERROR | |
I2C_EVENT_STOPPED | |
I2C_EVENT_NUM_EVENTS |
Definition at line 97 of file pios_i2c_priv.h.
enum i2c_adapter_state |
Enumerator | |
---|---|
I2C_STATE_FSM_FAULT | |
I2C_STATE_BUS_ERROR | |
I2C_STATE_STOPPED | |
I2C_STATE_STARTING | |
I2C_STATE_TRANSFER_COMPLETE | |
I2C_STATE_NACK | |
I2C_STATE_NUM_STATES |
Definition at line 48 of file pios_i2c_priv.h.
Enumerator | |
---|---|
PIOS_I2C_DEV_MAGIC |
Definition at line 127 of file pios_i2c_priv.h.
enum pios_i2c_error_type |
Enumerator | |
---|---|
PIOS_I2C_ERROR_EVENT | |
PIOS_I2C_ERROR_FSM | |
PIOS_I2C_ERROR_INTERRUPT |
Definition at line 131 of file pios_i2c_priv.h.
int32_t PIOS_I2C_Init | ( | pios_i2c_t * | i2c_id, |
const struct pios_i2c_adapter_cfg * | cfg | ||
) |