summaryrefslogtreecommitdiff
path: root/src/attiny/ao_arch_funcs.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-21 11:16:54 -0700
committerKeith Packard <keithp@keithp.com>2013-05-21 11:16:54 -0700
commitfd5567882b732f8947b44b217552077c82a3d28e (patch)
tree291a07d2c1f0586c238f29389abc881096e27c5f /src/attiny/ao_arch_funcs.h
parentfd55c1fe53adf5c50dcd3ce8296f80871cec73e9 (diff)
parent57b4d82dee10b142b820aa306028a288a85214f6 (diff)
Merge branch 'lpc'
Diffstat (limited to 'src/attiny/ao_arch_funcs.h')
-rw-r--r--src/attiny/ao_arch_funcs.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/attiny/ao_arch_funcs.h b/src/attiny/ao_arch_funcs.h
index 8c9d1ae6..76dc7820 100644
--- a/src/attiny/ao_arch_funcs.h
+++ b/src/attiny/ao_arch_funcs.h
@@ -20,21 +20,16 @@
*/
#define ao_spi_get_mask(reg,mask,bus,speed) do { \
- (reg) &= ~(mask); \
+ (reg) &= ~(mask); \
} while (0)
#define ao_spi_put_mask(reg,mask,bus) do { \
(reg) |= (mask); \
} while (0)
-#define ao_spi_get_bit(reg,bit,pin,bus,speed) do { \
- (pin) = 0; \
- } while (0)
-
-#define ao_spi_put_bit(reg,bit,pin,bus) do { \
- (pin) = 1; \
- } while (0)
+#define ao_spi_get_bit(reg,bit,pin,bus,speed) ao_spi_get_mask(reg,(1<<(bit)),bus,speed)
+#define ao_spi_put_bit(reg,bit,pin,bus) ao_spi_put_mask(reg,(1<<(bit)),bus)
#define ao_gpio_token_paster(x,y) x ## y
#define ao_gpio_token_evaluator(x,y) ao_gpio_token_paster(x,y)