Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
i2c_arch.c
Go to the documentation of this file.
1 #include "mcu_periph/i2c.h"
2 
3 bool_t i2c_idle(struct i2c_periph *p __attribute__ ((unused))) { return TRUE; }
4 bool_t i2c_submit(struct i2c_periph* p __attribute__ ((unused)), struct i2c_transaction* t __attribute__ ((unused))) { return TRUE;}
5 void i2c_event(void) { }
6 void i2c2_setbitrate(int bitrate __attribute__ ((unused))) { }
7 
8 
9 #ifdef USE_I2C0
10 struct i2c_errors i2c0_errors;
11 
12 void i2c0_hw_init(void) {
13  i2c0.errors = &i2c0_errors;
14  ZEROS_ERR_COUNTER(i2c0_errors);
15 }
16 #endif
17 
18 #ifdef USE_I2C1
19 struct i2c_errors i2c1_errors;
20 
21 void i2c1_hw_init(void) {
22  i2c1.errors = &i2c1_errors;
23  ZEROS_ERR_COUNTER(i2c1_errors);
24 }
25 #endif
26 
27 #ifdef USE_I2C2
28 struct i2c_errors i2c2_errors;
29 
30 void i2c2_hw_init(void) {
31  i2c2.errors = &i2c2_errors;
32  ZEROS_ERR_COUNTER(i2c2_errors);
33 }
34 #endif
void i2c_event(void)
Definition: i2c_arch.c:344
bool_t i2c_idle(struct i2c_periph *p)
Definition: i2c_arch.c:317
bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
Definition: i2c_arch.c:321
Definition: i2c.h:70
#define TRUE
Definition: imu_chimu.h:144
#define ZEROS_ERR_COUNTER(_i2c_err)
Definition: i2c.h:94
Definition: i2c.h:54
void i2c2_setbitrate(int bitrate __attribute__((unused)))
Definition: i2c_arch.c:6
__attribute__((always_inline))
Definition: i2c_arch.c:35