diff options
author | Christian Pointner <equinox@mur.at> | 2013-03-22 04:18:23 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2013-03-22 04:18:23 +0000 |
commit | 4145bfa1ac6cd886d1ef217826910857562be107 (patch) | |
tree | 9cd7f32b0c751efedb96b00fcf943fba6d647b12 | |
parent | added dtmf stuff (not working yet...) (diff) |
cleanup
git-svn-id: https://svn.spreadspace.org/mur.sat@707 7de4ea59-55d0-425e-a1af-a3118ea81d4c
-rw-r--r-- | software/rda1846dongle/rda1846.c | 4 | ||||
-rw-r--r-- | software/rda1846dongle/rda1846_defines.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/software/rda1846dongle/rda1846.c b/software/rda1846dongle/rda1846.c index 3b89f2a..bd68710 100644 --- a/software/rda1846dongle/rda1846.c +++ b/software/rda1846dongle/rda1846.c @@ -79,7 +79,7 @@ static uint8_t rda1846_read_register_raw(const uint8_t addr, uint16_t* data) i2c_error: TWI_StopTransmission(); - printf("I2C error (write_register_raw)\r\n"); + printf("I2C error (read_register_raw)\r\n"); return 1; } @@ -296,7 +296,7 @@ uint16_t rda1846_get_flags(void) if(rda1846_read_register(RDA1846_REG_FLAG, &data)) return 0xFFFF; - return data & 0x1687; + return data & RDA1846_FLAGS_MASK; } uint16_t rda1846_get_dtmf(uint8_t* idx1, uint8_t* idx2, uint8_t* code, uint8_t* valid) diff --git a/software/rda1846dongle/rda1846_defines.h b/software/rda1846dongle/rda1846_defines.h index e6fca56..616ee43 100644 --- a/software/rda1846dongle/rda1846_defines.h +++ b/software/rda1846dongle/rda1846_defines.h @@ -114,6 +114,8 @@ #define RDA1846_FLAG_SQ 0x0002 #define RDA1846_FLAG_VOX 0x0001 +#define RDA1846_FLAGS_MASK 0x1687 + // gpio #define RDA1846_GPIO_7_HI_Z 0x0000 |