diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/coldfire/pcf50606-coldfire.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/target/coldfire/pcf50606-coldfire.c b/firmware/target/coldfire/pcf50606-coldfire.c index 8ee38840d6..03c22a12e9 100644 --- a/firmware/target/coldfire/pcf50606-coldfire.c +++ b/firmware/target/coldfire/pcf50606-coldfire.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #define SCL_HI_IN and_l(~SCL_BIT, &SCL_GPIO_ENABLE); while(!SCL); | 61 | #define SCL_HI_IN and_l(~SCL_BIT, &SCL_GPIO_ENABLE); while(!SCL); |
62 | 62 | ||
63 | #define DELAY \ | 63 | #define DELAY \ |
64 | asm ( \ | 64 | asm volatile ( \ |
65 | "move.l %[dly],%%d0 \n" \ | 65 | "move.l %[dly],%%d0 \n" \ |
66 | "1: \n" \ | 66 | "1: \n" \ |
67 | "subq.l #1,%%d0 \n" \ | 67 | "subq.l #1,%%d0 \n" \ |
@@ -89,7 +89,7 @@ void pcf50606_i2c_recalc_delay(int cpu_clock) | |||
89 | inline void pcf50606_i2c_start(void) | 89 | inline void pcf50606_i2c_start(void) |
90 | { | 90 | { |
91 | #ifdef USE_ASM | 91 | #ifdef USE_ASM |
92 | asm ( | 92 | asm volatile ( |
93 | "not.l %[sdab] \n" /* SDA_HI_IN */ | 93 | "not.l %[sdab] \n" /* SDA_HI_IN */ |
94 | "and.l %[sdab],(8,%[sdard]) \n" | 94 | "and.l %[sdab],(8,%[sdard]) \n" |
95 | "not.l %[sdab] \n" | 95 | "not.l %[sdab] \n" |
@@ -139,7 +139,7 @@ inline void pcf50606_i2c_start(void) | |||
139 | inline void pcf50606_i2c_stop(void) | 139 | inline void pcf50606_i2c_stop(void) |
140 | { | 140 | { |
141 | #ifdef USE_ASM | 141 | #ifdef USE_ASM |
142 | asm ( | 142 | asm volatile ( |
143 | "or.l %[sdab],(8,%[sdard]) \n" /* SDA_LO_OUT */ | 143 | "or.l %[sdab],(8,%[sdard]) \n" /* SDA_LO_OUT */ |
144 | 144 | ||
145 | "move.l %[dly],%%d0 \n" /* DELAY */ | 145 | "move.l %[dly],%%d0 \n" /* DELAY */ |
@@ -186,7 +186,7 @@ inline void pcf50606_i2c_stop(void) | |||
186 | inline void pcf50606_i2c_ack(bool ack) | 186 | inline void pcf50606_i2c_ack(bool ack) |
187 | { | 187 | { |
188 | #ifdef USE_ASM | 188 | #ifdef USE_ASM |
189 | asm ( | 189 | asm volatile ( |
190 | "tst.b %[ack] \n" /* if (!ack) */ | 190 | "tst.b %[ack] \n" /* if (!ack) */ |
191 | "bne.s 1f \n" | 191 | "bne.s 1f \n" |
192 | 192 | ||
@@ -245,7 +245,7 @@ inline bool pcf50606_i2c_getack(void) | |||
245 | bool ret; | 245 | bool ret; |
246 | 246 | ||
247 | #ifdef USE_ASM | 247 | #ifdef USE_ASM |
248 | asm ( | 248 | asm volatile ( |
249 | "not.l %[sdab] \n" /* SDA_HI_IN */ | 249 | "not.l %[sdab] \n" /* SDA_HI_IN */ |
250 | "and.l %[sdab],(8,%[sdard]) \n" | 250 | "and.l %[sdab],(8,%[sdard]) \n" |
251 | "not.l %[sdab] \n" | 251 | "not.l %[sdab] \n" |
@@ -375,7 +375,7 @@ unsigned char pcf50606_i2c_inb(bool ack) | |||
375 | unsigned char byte = 0; | 375 | unsigned char byte = 0; |
376 | 376 | ||
377 | #ifdef USE_ASM | 377 | #ifdef USE_ASM |
378 | asm ( | 378 | asm volatile ( |
379 | "not.l %[sdab] \n" /* SDA_HI_IN */ | 379 | "not.l %[sdab] \n" /* SDA_HI_IN */ |
380 | "and.l %[sdab],(8,%[sdard]) \n" | 380 | "and.l %[sdab],(8,%[sdard]) \n" |
381 | "not.l %[sdab] \n" | 381 | "not.l %[sdab] \n" |
@@ -550,3 +550,4 @@ int pcf50606_write(int address, unsigned char val) | |||
550 | { | 550 | { |
551 | return pcf50606_write_multiple(address, &val, 1); | 551 | return pcf50606_write_multiple(address, &val, 1); |
552 | } | 552 | } |
553 | |||