Updated to match the new sensors API
This commit is contained in:
parent
4ffa7b95b7
commit
dbe56e4666
7 changed files with 24 additions and 28 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: ctsrts-sensor.c,v 1.2 2010/01/14 17:39:35 nifi Exp $
|
||||
* @(#)$Id: ctsrts-sensor.c,v 1.3 2010/01/14 20:03:27 nifi Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,9 @@ const struct sensors_sensor ctsrts_sensor;
|
|||
|
||||
HWCONF_PIN(RS232RTS, 1, 7);
|
||||
|
||||
HWCONF_PIN(RS232CTS, 1, 6);
|
||||
HWCONF_IRQ(RS232CTS, 1, 6);
|
||||
#define RS232CTS_IRQ() 6
|
||||
HWCONF_PIN(RS232CTS, 1, RS232CTS_IRQ());
|
||||
HWCONF_IRQ(RS232CTS, 1, RS232CTS_IRQ());
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
|
@ -104,12 +105,12 @@ configure(int type, int value)
|
|||
RS232CTS_IRQ_EDGE_SELECTU();
|
||||
}
|
||||
|
||||
irq_port1_activate(RS232CTS_IRQ_PORT(), irq);
|
||||
irq_port1_activate(RS232CTS_IRQ(), irq);
|
||||
RS232CTS_ENABLE_IRQ();
|
||||
}
|
||||
} else {
|
||||
RS232CTS_DISABLE_IRQ();
|
||||
irq_port1_deactivate(RS232CTS_IRQ_PORT());
|
||||
irq_port1_deactivate(RS232CTS_IRQ());
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue