Commit 363de56ad82a5dbd9866a8db1b70cd9091ef948f
authorJakob Gruber <jakob.gruber@gmail.com>
Thu, 26 Jul 2012 09:23:33 +0000 (11:23 +0200)
committerJakob Gruber <jakob.gruber@gmail.com>
Thu, 26 Jul 2012 12:40:46 +0000 (14:40 +0200)
This fixes inclusion of avr_twi.h into C++ files.

2 files changed:
simavr/sim/avr_twi.c
simavr/sim/avr_twi.h

index 6f176715e8524314db9bb1f487916c1054136976..1d58174f98f3063fcd08d6dc3c847614199fba32 100644 (file)
@@ -392,3 +392,16 @@ void avr_twi_init(avr_t * avr, avr_twi_t * p)
        avr_register_io_write(avr, p->twsr.reg, avr_twi_write_status, p);
 }
 
+uint32_t
+avr_twi_irq_msg(
+               uint8_t msg,
+               uint8_t addr,
+               uint8_t data)
+{
+       avr_twi_msg_irq_t _msg = {
+                       .u.twi.msg = msg,
+                       .u.twi.addr = addr,
+                       .u.twi.data = data,
+       };
+       return _msg.u.v;
+}
index 5a84ba98acb2f977bd04586d6936ff799a7613d0..6b30c3450335b9de982eb372d693132ec9ac473f 100644 (file)
@@ -97,18 +97,10 @@ avr_twi_init(
  * Create a message value for twi including the 'msg' bitfield,
  * 'addr' and data. This value is what is sent as the IRQ value
  */
-static inline uint32_t
+uint32_t
 avr_twi_irq_msg(
                uint8_t msg,
                uint8_t addr,
-               uint8_t data)
-{
-       avr_twi_msg_irq_t _msg = {
-                       .u.twi.msg = msg,
-                       .u.twi.addr = addr,
-                       .u.twi.data = data,
-       };
-       return _msg.u.v;
-}
+               uint8_t data);
 
 #endif /* AVR_TWI_H_ */