chip/ish/ish_i2c.h: Format with clang-format
BRANCH=none
TEST=none
#define DEFAULT_SDA_HOLD_FAST_PLUS 300
#define DEFAULT_SDA_HOLD_HIGH 140
#define NS_2_COUNTERS(ns, clk) ((ns * clk) / NS_IN_SEC)
-#define COUNTERS_2_NS(counters, clk) (counters * (NANOSECONDS_IN_SEC / \
- (clk * HZ_IN_MEGAHZ)))
+#define COUNTERS_2_NS(counters, clk) \
+ (counters * (NANOSECONDS_IN_SEC / (clk * HZ_IN_MEGAHZ)))
#define I2C_TX_FLUSH_TIMEOUT_USEC 200
#define ISH_I2C_FIFO_SIZE 64
-
enum {
/* freq mode values */
I2C_FREQ_25 = 0,
@@ -38,29 +37,18 @@ enum {
};
const unsigned int clk_in[] = {
- [I2C_FREQ_25] = 25,
- [I2C_FREQ_50] = 50,
- [I2C_FREQ_100] = 100,
- [I2C_FREQ_120] = 120,
- [I2C_FREQ_40] = 40,
- [I2C_FREQ_20] = 20,
+ [I2C_FREQ_25] = 25, [I2C_FREQ_50] = 50, [I2C_FREQ_100] = 100,
+ [I2C_FREQ_120] = 120, [I2C_FREQ_40] = 40, [I2C_FREQ_20] = 20,
[I2C_FREQ_37] = 37,
};
const uint8_t spkln[] = {
- [I2C_FREQ_25] = 2,
- [I2C_FREQ_50] = 3,
- [I2C_FREQ_100] = 5,
- [I2C_FREQ_120] = 6,
- [I2C_FREQ_40] = 2,
- [I2C_FREQ_20] = 1,
+ [I2C_FREQ_25] = 2, [I2C_FREQ_50] = 3, [I2C_FREQ_100] = 5,
+ [I2C_FREQ_120] = 6, [I2C_FREQ_40] = 2, [I2C_FREQ_20] = 1,
[I2C_FREQ_37] = 2,
};
-enum {
- I2C_READ,
- I2C_WRITE
-};
+enum { I2C_READ, I2C_WRITE };
enum {
/* REGISTERS */
