commit | b48e6d0e1c7e533d3da5519a9b0d76026db14f4d | [log] [tgz] |
---|---|---|
author | Andrew Ryabinin <ryabinin.a.a@gmail.com> | Sun Oct 27 22:51:51 2013 +0400 |
committer | Andrew Ryabinin <ryabinin.a.a@gmail.com> | Tue Nov 05 09:59:45 2013 +0400 |
tree | 216251ce3fd8aad9f1a6407ed653cb15ccdd2de2 | |
parent | c49a447dd0a4d7cb7c1cd7b193376fbcafd49f99 [diff] |
ma9: Fix 'always load OF' bug in bootloader. button_read_device() could be called before pca9555_read_thread intializes pca9555_in_ports variable, and return incorrect value. Change-Id: I960bff72fe230c9d0256b20e92d0a75e67266038
diff --git a/firmware/target/arm/rk27xx/ma/pca9555-ma.c b/firmware/target/arm/rk27xx/ma/pca9555-ma.c index 9611d84..328a87e 100644 --- a/firmware/target/arm/rk27xx/ma/pca9555-ma.c +++ b/firmware/target/arm/rk27xx/ma/pca9555-ma.c
@@ -71,6 +71,7 @@ */ data |= ((1<<10)|(0<<9)|(1<<8)); pca9555_write_output(data, 0xffff); + pca9555_in_ports = pca9555_read_input(); } void pca9555_target_init(void)