Change the way we switch between cc2530 models

The switch is now performed through a configuration define,
which has also been renamed to better match Contiki's naming
conventions
This commit is contained in:
George Oikonomou 2013-04-03 15:59:05 +01:00 committed by George Oikonomou
parent 1b0470687b
commit f30d92b101
12 changed files with 29 additions and 19 deletions

View file

@ -54,7 +54,7 @@
* B2: P1_3
*
*/
#if MODEL_CC2531
#if MODELS_CONF_CC2531_USB_STICK
#define BUTTON1_PORT 1
#define BUTTON1_PIN 2
#define BUTTON2_PORT 1
@ -73,7 +73,7 @@ extern const struct sensors_sensor button_1_sensor;
extern const struct sensors_sensor button_2_sensor;
#if BUTTON_SENSOR_ON
#if MODEL_CC2531
#if MODELS_CONF_CC2531_USB_STICK
/* USB Dongle */
/* Buttons: P1_2 & P1_3 - Port 1 ISR needed */
void port_1_isr(void) __interrupt(P1INT_VECTOR);
@ -82,12 +82,12 @@ void port_1_isr(void) __interrupt(P1INT_VECTOR);
button_2_sensor.configure(SENSORS_ACTIVE, 1); \
} while(0)
#else /* MODEL_CC2531 */
#else /* MODELS_CONF_CC2531_USB_STICK */
/* SmartRF */
/* Button 1: P0_1 - Port 0 ISR needed */
void port_0_isr(void) __interrupt(P0INT_VECTOR);
#define BUTTON_SENSOR_ACTIVATE() button_sensor.configure(SENSORS_ACTIVE, 1)
#endif /* MODEL_CC2531 */
#endif /* MODELS_CONF_CC2531_USB_STICK */
#else /* BUTTON_SENSOR_ON */
#define BUTTON_SENSOR_ACTIVATE()