diff --git a/f32x/c2-bitbang.c b/f32x/c2-bitbang.c index 1b3eed1..3c00a91 100644 --- a/f32x/c2-bitbang.c +++ b/f32x/c2-bitbang.c @@ -16,6 +16,10 @@ */ +#include +#include + + /* ----- Bit-level operations ---------------------------------------------- */ @@ -106,7 +110,6 @@ static uint32_t c2_data_read(int bytes) static void c2_init(void) { - gpio_init(); gpio_input(C2D); gpio_output(C2CK); gpio_low(C2CK); diff --git a/f32x/c2-om.c b/f32x/c2-om.c index ceed350..8d9ba48 100644 --- a/f32x/c2-om.c +++ b/f32x/c2-om.c @@ -11,9 +11,6 @@ */ -#include -#include - #include "gpio-s3c24xx.h" #include "c2-drv.h" @@ -30,11 +27,15 @@ #include "c2-bitbang.c" -/* ----- Operations -------------------------------------------------------- */ +static void om_init(void) +{ + gpio_init(); + c2_init(); +} struct c2_ops c2_om = { - .init = c2_init, + .init = om_init, .reset = c2_reset, .addr_write = c2_addr_write, .addr_read = c2_addr_read,