projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: coding style fixes (structure naming)
[bertos.git]
/
bertos
/
drv
/
lm75.h
diff --git
a/bertos/drv/lm75.h
b/bertos/drv/lm75.h
index f1d9bf7cf3e1ce102a01b357612e4d56c8324174..78a1c4053e5e50311e146a1c72af035a1666598d 100644
(file)
--- a/
bertos/drv/lm75.h
+++ b/
bertos/drv/lm75.h
@@
-46,14
+46,23
@@
#include <cpu/types.h>
#include <drv/ntc.h> // Macro and data type to manage celsius degree
#include <cpu/types.h>
#include <drv/ntc.h> // Macro and data type to manage celsius degree
+#include <drv/i2c.h>
-#define LM75_ADDRESS_BYTE 0x91
-#define LM75_PAD_BYTE 0x0
+#include <cpu/attr.h>
-typedef uint8_t addr_t;
+#define I2C_READBIT BV(0)
-deg_t lm75_read(addr_t sens_addr);
+#if COMPILER_C99
+ #define lm75_read(...) PP_CAT(lm75_read ## _, COUNT_PARMS(__VA_ARGS__)) (__VA_ARGS__)
+#else
+ #define lm75_read(args...) PP_CAT(lm75_read ## _, COUNT_PARMS(args)) (args)
+#endif
-void lm75_init(void);
+#if !CONFIG_I2C_DISABLE_OLD_API
+
+DEPRECATED deg_t lm75_read_1(uint8_t sens_addr);
+#endif /* !CONFIG_I2C_DISABLE_OLD_API */
+
+deg_t lm75_read_2(I2c *i2c, uint8_t sens_addr);
#endif /* DRV_LM75_H */
#endif /* DRV_LM75_H */