Skip to content

Commit

Permalink
Whoops, forgot the opening braces in the .c
Browse files Browse the repository at this point in the history
  • Loading branch information
mrj10 committed Mar 4, 2014
1 parent 506246a commit bd7da85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exynos_5410_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void odroid_xu_gpio_toggle(unsigned int pin_index) {
}

//Create specialized functions for each pin to avoid the pin_lookup() call
#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) void EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_toggle_, pin_num) () \
#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) void EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_toggle_, pin_num) () {\
unsigned int bank_offset = offset; \
unsigned int bit_index = bit_num; \
unsigned int d = exynos_5410_gpio_read(bank_offset); \
Expand All @@ -180,15 +180,15 @@ void odroid_xu_gpio_toggle(unsigned int pin_index) {
EXYNOS_5410_GPIO_PINS
#undef EXYNOS_5410_GPIO_PIN

#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) unsigned int EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_read_, pin_num) () \
#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) unsigned int EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_read_, pin_num) () {\
unsigned int bank_offset = offset; \
unsigned int bit_index = bit_num; \
return (exynos_5410_gpio_read(bank_offset) >> bit_index) & 0x1; \
}
EXYNOS_5410_GPIO_PINS
#undef EXYNOS_5410_GPIO_PIN

#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) void EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_write_, pin_num) (unsigned int data) \
#define EXYNOS_5410_GPIO_PIN(pin_num, offset, bit_num) void EXYNOS_5410_GPIO_CAT(odroid_xu_gpio_write_, pin_num) (unsigned int data) {\
unsigned int bank_offset = offset; \
unsigned int bit_index = bit_num; \
exynos_5410_gpio_write_mask(bank_offset, ((data & 1U) << bit_index), (1U << bit_index)); \
Expand Down

0 comments on commit bd7da85

Please sign in to comment.