From 62fbd389d871721f8965f43d792d103a6d7ef50b Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Thu, 21 Jun 2012 10:50:41 +0100 Subject: [PATCH] Renamed a cc253x SFRX to stop namespace conflicts The TR0 SFRX can not use the name TR0 because it conflicts with TCON.TR0 on the default 8051. See SDCC bug 3513300 --- cpu/cc253x/cc253x.h | 6 +++++- platform/cc2530dk/dev/adc-sensor.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpu/cc253x/cc253x.h b/cpu/cc253x/cc253x.h index 27c022eec..68bc3a293 100644 --- a/cpu/cc253x/cc253x.h +++ b/cpu/cc253x/cc253x.h @@ -349,7 +349,11 @@ SFRX(OBSSEL4, 0x6247); /* Observation output control - register 4 */ SFRX(OBSSEL5, 0x6248); /* Observation output control - register 5 */ SFRX(CHVER, 0x6249); /* Chip version */ SFRX(CHIPID, 0x624A); /* Chip identification */ -SFRX(TR0, 0x624B); /* Test register 0 */ + +/* TR0 below is renamed to TESTREG0 to avoid namespace conflicts with the + * bit-addressable TCON.TR0 on the default 8051. See SDCC bug 3513300 */ +SFRX(TESTREG0, 0x624B); /* Test register 0 */ + SFRX(DBGDATA, 0x6260); /* Debug interface write data */ SFRX(SRCRC, 0x6262); /* Sleep reset CRC */ SFRX(BATTMON, 0x6264); /* Battery monitor */ diff --git a/platform/cc2530dk/dev/adc-sensor.c b/platform/cc2530dk/dev/adc-sensor.c index 005852d96..3f22c6adb 100644 --- a/platform/cc2530dk/dev/adc-sensor.c +++ b/platform/cc2530dk/dev/adc-sensor.c @@ -111,7 +111,7 @@ configure(int type, int value) #if TEMP_SENSOR_ON /* Connect temperature sensor to the SoC */ ATEST = 1; - TR0 = 1; + TESTREG0 = 1; #endif APCFG = 0; /* Disables Input Channels */ break;