Renamed serial module to serial-line

ico
adamdunkels 2009-03-17 20:32:22 +00:00
parent 4b6c110706
commit 727c5a2dbe
10 changed files with 28 additions and 29 deletions

View File

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: rs232.c,v 1.4 2008/11/09 15:39:49 c_oflynn Exp $
* @(#)$Id: rs232.c,v 1.5 2009/03/17 20:32:22 adamdunkels Exp $
*/
#include <stdio.h>
@ -40,7 +40,6 @@
#include "contiki.h"
#include "dev/slip.h"
#include "dev/serial.h"
#include "dev/rs232.h"
#ifdef RS232_CONF_PRINTF_BUFFER_LENGTH
@ -126,11 +125,11 @@ void
rs232_init (uint8_t port, uint8_t bd, uint8_t ffmt)
{
*(rs232_ports[port].UBRRH) = (uint8_t)(bd>>8);
*(rs232_ports[port].UBRRL) = (uint8_t)bd;
*(rs232_ports[port].UBRRL) = (uint8_t)bd;
/*
* - Enable receiver and transmitter,
* - Enable interrupts for receiver and transmitter
* - Enable interrupts for receiver and transmitter
*/
*(rs232_ports[port].UCSRB) = USART_INTERRUPT_RX_COMPLETE | USART_INTERRUPT_TX_COMPLETE | \
USART_RECEIVER_ENABLE | USART_TRANSMITTER_ENABLE;

View File

@ -50,13 +50,13 @@
#include "contiki-lib.h"
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
#include "sicslowmac.h"
FUSES =
FUSES =
{
.low = 0xe2,
.high = 0x99,
@ -88,7 +88,7 @@ init_lowlevel(void)
/* Redirect stdout to second port */
rs232_redirect_stdout(RS232_PORT_1);
DDRE |= LED1 | LED2 | LED3;
DDRE |= LED1 | LED2 | LED3;
}
@ -105,12 +105,12 @@ PROCESS_THREAD(rcb_leds, ev, data)
if (ev == ICMP6_ECHO_REQUEST) {
LEDOn(LED2);
LEDOn(LED2);
etimer_set(&et, CLOCK_SECOND/10);
} else {
LEDOff(LED2);
}
}
}
}
PROCESS_END();
}

View File

@ -48,7 +48,7 @@
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
void init_lowlevel(void);

View File

@ -50,15 +50,15 @@
#include "contiki-lib.h"
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
#include "sicslowmac.h"
FUSES =
FUSES =
{
.low = (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0), // 0xe2,
.high = (FUSE_BOOTSZ0 /*& FUSE_BOOTSZ1*/ & FUSE_SPIEN & FUSE_JTAGEN), //0x9D,
.high = (FUSE_BOOTSZ0 /*& FUSE_BOOTSZ1*/ & FUSE_SPIEN & FUSE_JTAGEN), //0x9D,
.extended = 0xff,
};

View File

@ -48,7 +48,7 @@
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
void init_lowlevel(void);

View File

@ -26,11 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: testserial.c,v 1.3 2009/03/17 15:56:32 adamdunkels Exp $
* $Id: testserial.c,v 1.4 2009/03/17 20:32:22 adamdunkels Exp $
*/
#include "contiki.h"
#include "dev/serial-port.h"
#include "dev/serial-line.h"
#include "dev/rs232.h"
#include <stdio.h>
@ -47,7 +47,7 @@ PROCESS_THREAD(test_serial_process, ev, data)
etimer_set(&et, CLOCK_SECOND);
/* Start serial process */
serial_port_init();
serial_line_init();
printf("Starting serial test process\n");
@ -60,7 +60,7 @@ PROCESS_THREAD(test_serial_process, ev, data)
etimer_restart(&et);
}
if(ev == serial_port_event_message) {
if(ev == serial_line_event_message) {
printf("Message received: '%s'\n", data);
}
}

View File

@ -29,13 +29,13 @@
*
* This file is part of the Contiki OS
*
* $Id: ethernut-main.c,v 1.2 2006/06/20 21:23:10 adamdunkels Exp $
* $Id: ethernut-main.c,v 1.3 2009/03/17 20:32:22 adamdunkels Exp $
*
*/
#include "contiki.h"
#include "contiki-net.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
#include "dev/rs232.h"
@ -59,13 +59,13 @@ PROCESS_THREAD(serial_test, ev, data)
PROCESS_BEGIN();
while(1) {
PROCESS_WAIT_EVENT_UNTIL(ev == serial_event_message);
PROCESS_WAIT_EVENT_UNTIL(ev == serial_line_event_message);
rs232_print(data);
}
PROCESS_END();
}
PROCINIT(&etimer_process, &serial_process, &slip_process,
PROCINIT(&etimer_process, &serial_line_process, &slip_process,
&uip_fw_process);
int

View File

@ -45,7 +45,7 @@
#include "dev/lpm.h"
#include "dev/msb430-uart1.h"
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
#ifdef WITH_SDC

View File

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: contiki-serial-main.c,v 1.3 2007/11/28 09:44:27 matsutsuka Exp $
* $Id: contiki-serial-main.c,v 1.4 2009/03/17 20:32:22 adamdunkels Exp $
*
*/
@ -41,7 +41,7 @@
#include "contiki.h"
/* devices */
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "ctk/libconio_arch-small.h"
#undef RS232_INTR
@ -75,7 +75,7 @@ PROCESS_THREAD(stest_process, ev, data)
clrscr_arch();
#ifdef RS232_INTR
rs232_arch_init(serial_input_byte, 0);
rs232_arch_init(serial_line_input_byte, 0);
#endif
etimer_set(&timer, CLOCK_SECOND);
@ -90,7 +90,7 @@ PROCESS_THREAD(stest_process, ev, data)
etimer_reset(&timer);
}
if(ev == serial_event_message) {
if(ev == serial_line_event_message) {
log_message(data);
}
}
@ -106,7 +106,7 @@ main(void)
/* start services */
process_start(&etimer_process, NULL);
process_start(&serial_process, NULL);
process_start(&serial_line_process, NULL);
#ifndef RS232_INTR
process_start(&rs232_process, NULL);
#endif

View File

@ -48,7 +48,7 @@
#include "dev/rs232.h"
#include "dev/serial.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
void init_lowlevel(void);