AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
Configuration

Description détaillée

Ce port permet de gérer la communication sur une liaison série asynchrone à l'aide du coupleur USART.

Graphe de collaboration de Configuration:

Structures de données

struct  xSerialIos
 

Macros

#define EBADBAUD   (-2)
 Erreur de baudrate.
 
#define SERIAL_BINARY   0
 
#define SERIAL_CR   0x0D
 
#define SERIAL_CRLF   (SERIAL_CR + SERIAL_LF)
 
#define SERIAL_LF   0x0A
 
#define SERIAL_SETTINGS(b)
 

Définitions de type

typedef struct xSerialIos xSerialIos
 

Énumérations

enum  eSerialDataBits {
  SERIAL_DATABIT_5 = 5, SERIAL_DATABIT_6 = 6, SERIAL_DATABIT_7 = 7, SERIAL_DATABIT_8 = 8,
  SERIAL_DATABIT_9 = 9, SERIAL_DATABIT_UNKNOWN = -1
}
 Nombre de bits de données.
 
enum  eSerialFlow { SERIAL_FLOW_NONE = ' ', SERIAL_FLOW_RTSCTS = 'H', SERIAL_FLOW_XONXOFF = 'S', SERIAL_FLOW_UNKNOWN = -1 }
 Type de contrôle de flux.
 
enum  eSerialParity {
  SERIAL_PARITY_NONE = 'N', SERIAL_PARITY_EVEN = 'E', SERIAL_PARITY_ODD = 'O', SERIAL_PARITY_SPACE = 'S',
  SERIAL_PARITY_MARK = 'M', SERIAL_PARITY_UNKNOWN = -1
}
 Parité
 
enum  eSerialStopBits { SERIAL_STOPBIT_ONE = 1, SERIAL_STOPBIT_TWO = 2, SERIAL_STOPBIT_ONEHALF = 3, SERIAL_STOPBIT_UNKNOWN }
 Nombre de bits de stop.
 

Documentation des macros

#define SERIAL_BINARY   0

Flux binaire, pas de modification

Définition à la ligne 92 du fichier serialios.h.

#define SERIAL_CR   0x0D

Les LF (0x0A) sont remplacés par des CR (0x0D)

Définition à la ligne 93 du fichier serialios.h.

#define SERIAL_CRLF   (SERIAL_CR + SERIAL_LF)

Un CR (0x0D) est ajouté avant chaque LF (0x0A)

Exemples:
net/onewire/ds2438/demo_ow_ds2438.c, net/onewire/scan/demo_ow_scan.c, et serial/demo_serial.c.

Définition à la ligne 95 du fichier serialios.h.

#define SERIAL_LF   0x0A

Les CR (0x0D) sont remplacés par des LF (0x0A)

Définition à la ligne 94 du fichier serialios.h.

#define SERIAL_SETTINGS (   b)
Valeur :
{ \
.baud = b, .dbits = SERIAL_DATABIT_8, .parity = SERIAL_PARITY_NONE, \
.sbits = SERIAL_STOPBIT_ONE, .flow = SERIAL_FLOW_NONE, .eol = SERIAL_CRLF }
#define SERIAL_CRLF
Definition: serialios.h:95

Définition à la ligne 110 du fichier serialios.h.

Documentation des définitions de type

typedef struct xSerialIos xSerialIos

Configuration d'un port série