mos/com/include/serial.h File Reference

Mac layer built on top of serial uart devices. More...

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include "com.h"

Go to the source code of this file.

Defines

#define DEFAULT_BAUDRATE   B57600
#define DEFAULT_SERIAL_DEV   "/dev/ttyS0"
#define BAUD_RATE   0
#define PARITY   1

Functions

void serial_init_fd ()
 This will initialize the filedescriptor for the serial device.
uint8_t serial_init ()
 Setup the serial port and register with the com layer.
uint8_t serial_send (comBuf *buf)
 Send the buffer out over the serial port.
uint8_t serial_mode (uint8_t mode)
 See full description.
uint8_t serial_ioctl (uint8_t request, va_list ap)
 Generic control function for doing things like changing the properties of the serial connection etc...
uint8_t serial_get_mode ()
 get the current mode of the serial device
void serial_close ()
 Close the serial device this command returns control of the serial back to the system.


Detailed Description

Author:
Jeff Rose
Date:
02/01/2004

Definition in file serial.h.


Function Documentation

uint8_t serial_init  ) 
 

NOTE: -sdev [serial device] can be used to change the serial device.

uint8_t serial_mode uint8_t  mode  ) 
 

In linux this function is very important because we don't have any low power functionality, but you still must set to listen mode if you want to get packets.

uint8_t serial_send comBuf buf  ) 
 

Parameters:
buf Buffer to use


Generated on Mon Nov 23 06:25:59 2009 for MANTIS by  doxygen 1.4.6