Wixel SDK
Data Structures | Macros | Typedefs
com.h File Reference

Go to the source code of this file.

Data Structures

struct  ACM_LINE_CODING
 

Macros

#define ACM_SERIAL_STATE_RX_CARRIER   (1<<0)
 
#define ACM_SERIAL_STATE_TX_CARRIER   (1<<1)
 
#define ACM_SERIAL_STATE_BREAK   (1<<2)
 
#define ACM_SERIAL_STATE_RING_SIGNAL   (1<<3)
 
#define ACM_SERIAL_STATE_FRAMING   (1<<4)
 
#define ACM_SERIAL_STATE_PARITY   (1<<5)
 
#define ACM_SERIAL_STATE_OVERRUN   (1<<6)
 
#define ACM_IRREGULAR_SIGNAL_MASK   (ACM_SERIAL_STATE_BREAK | ACM_SERIAL_STATE_RING_SIGNAL | ACM_SERIAL_STATE_FRAMING | ACM_SERIAL_STATE_PARITY | ACM_SERIAL_STATE_OVERRUN)
 
#define ACM_CONTROL_LINE_DTR   1
 
#define ACM_CONTROL_LINE_RTS   2
 
#define PARITY_NONE   0
 
#define PARITY_ODD   1
 
#define PARITY_EVEN   2
 
#define PARITY_MARK   3
 
#define PARITY_SPACE   4
 
#define STOP_BITS_1   0
 
#define STOP_BITS_1_5   1
 
#define STOP_BITS_2   2
 

Typedefs

typedef struct ACM_LINE_CODING ACM_LINE_CODING
 

Detailed Description

Contains common code that is needed by usb_com.h, uart1.h, and uart0.h.

The ACM_SERIAL_STATE_* defines all come from Table 31 of PSTN specification. They serve to define the bits used in usbComTxSignals() (see usb_com.h).

The ACM_CONTROL_LINE_* defines all from the Table 18 of the PSTN specification. They serve to define the bits returned by usbComRxSignals() (see usb_com.h).

PSTN is a subclass of the USB CDC Device Class. You can find the specification of PSTN in PSTN120.pdf, available for download from USB Implementers Forum at this url: http://www.usb.org/developers/devclass_docs

Definition in file com.h.

Macro Definition Documentation

#define ACM_CONTROL_LINE_DTR   1

Indicates to the CDE if DTE is present or not.

  • 0 = Not Present
  • 1 = Present

Definition at line 54 of file com.h.

#define ACM_CONTROL_LINE_RTS   2

Carrier control for half duplex modems.

  • 0 = Deactivate carrier.
  • 1 = Activate carrier.

Definition at line 59 of file com.h.

These are the "irregular" signals, described in PSTN 1.20 Section 6.5.4. These bits represent events that can be reported to the USB host. They are more like interrupts than I/O lines. See the usbComTxControlSignals() function in usb_com.h for more information.

Definition at line 48 of file com.h.

#define ACM_SERIAL_STATE_BREAK   (1<<2)

State of break detection mechanism of the device.

Definition at line 30 of file com.h.

#define ACM_SERIAL_STATE_FRAMING   (1<<4)

A framing error has occurred.

Definition at line 36 of file com.h.

#define ACM_SERIAL_STATE_OVERRUN   (1<<6)

Received data has been discarded due to overrun in the device.

Definition at line 42 of file com.h.

#define ACM_SERIAL_STATE_PARITY   (1<<5)

A parity error has occurred.

Definition at line 39 of file com.h.

#define ACM_SERIAL_STATE_RING_SIGNAL   (1<<3)

State of ring signal detection of the device.

Definition at line 33 of file com.h.

#define ACM_SERIAL_STATE_RX_CARRIER   (1<<0)

UART State Bit Values from PSTN 1.20 Table 31.

State of receiver carrier detection mechanism of device. Also known as CD or CdHolding.

Definition at line 24 of file com.h.

#define ACM_SERIAL_STATE_TX_CARRIER   (1<<1)

State of transmission carrier. Also known as DSR or DsrHolding.

Definition at line 27 of file com.h.

#define PARITY_EVEN   2

Even parity. The total number of data bits that are 1 will be even.

Definition at line 91 of file com.h.

#define PARITY_MARK   3

Mark parity. Ninth bit of each byte will be logical 1.

Definition at line 94 of file com.h.

#define PARITY_NONE   0

No parity. Each serial byte will only have 8 bits.

Definition at line 85 of file com.h.

#define PARITY_ODD   1

Odd parity. The total number of data bits that are 1 will be odd.

Definition at line 88 of file com.h.

#define PARITY_SPACE   4

Mark parity. Ninth bit of each byte will be logical 0.

Definition at line 97 of file com.h.

#define STOP_BITS_1   0

The end of each byte will have 1 stop bit.

Definition at line 100 of file com.h.

#define STOP_BITS_1_5   1

The end of each serial byte will have 1.5 stop bits. The CC2511's UARTs do not actually support this option.

Definition at line 104 of file com.h.

#define STOP_BITS_2   2

The end of each serial byte will have 2 stop bits. The CC2511's UARTs do not support this option very well; the UART library may fail to detect framing errors from the second stop bit when this option is used.

Definition at line 111 of file com.h.

Typedef Documentation

Specifies the type of coding to use on an asynchronous serial line.

This struct is defined in PSTN120.pdf in Table 17: Line Coding Structure. PSTN120.pdf is available for download from USB Implementers Forum at this url: http://www.usb.org/developers/devclass_docs