• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Aufgabe 6: Synchronisation
                    • Aufgabe 7: Anwendung
                      • Assembler Crashkurs
                        • C++ Crashkurs
                          • Entwicklungsumgebung
                            • FAQ
                              • Ruhmeshalle
                              • Evaluation

                              Aufgabe 2: Unterbrechungen

                              Public Types | Public Member Functions | Protected Attributes | List of all members
                              Serial Class Reference

                              Serial interface. More...

                              #include <machine/serial.h>

                              + Inheritance diagram for Serial:
                              [legend]

                              Public Types

                              enum  ComPort {
                                COM1 = 0x3f8 ,
                                COM2 = 0x2f8 ,
                                COM3 = 0x3e8 ,
                                COM4 = 0x2e8
                              }
                               COM-Port. More...
                               
                              enum  BaudRate {
                                BAUD_300 = 384 ,
                                BAUD_600 = 192 ,
                                BAUD_1200 = 96 ,
                                BAUD_2400 = 48 ,
                                BAUD_4800 = 24 ,
                                BAUD_9600 = 12 ,
                                BAUD_19200 = 6 ,
                                BAUD_38400 = 3 ,
                                BAUD_57600 = 2 ,
                                BAUD_115200 = 1
                              }
                               Transmission speed. More...
                               
                              enum  DataBits {
                                DATA_5BIT = 0 ,
                                DATA_6BIT = 1 ,
                                DATA_7BIT = 2 ,
                                DATA_8BIT = 3
                              }
                               Number of data bits per character.
                               
                              enum  StopBits {
                                STOP_1BIT = 0 ,
                                STOP_1_5BIT = 4 ,
                                STOP_2BIT = 4
                              }
                               Number of stop bits per character.
                               
                              enum  Parity {
                                PARITY_NONE = 0 ,
                                PARITY_ODD = 8 ,
                                PARITY_EVEN = 24 ,
                                PARITY_MARK = 40 ,
                                PARITY_SPACE = 56
                              }
                               parity bit
                               

                              Public Member Functions

                               Serial (ComPort port=COM1, BaudRate baud_rate=BAUD_115200, DataBits data_bits=DATA_8BIT, StopBits stop_bits=STOP_1BIT, Parity parity=PARITY_NONE)
                               Constructor. More...
                               
                              int read (bool blocking=true)
                               Read one byte from the serial interface. More...
                               
                              int write (char out, bool blocking=true)
                               Write one byte to the serial interface. More...
                               

                              Protected Attributes

                              const ComPort port
                               Selected COM port.
                               

                              Detailed Description

                              Serial interface.

                              This class provides a serial interface (COM1 - COM4) for communication with the outside world.

                              The first IBM PC used the external chip 8250 UART, whereas, in today's systems, this functionality is commonly integrated into the southbridge, but remained compatible.

                              See also
                              PC8250A Data Sheet (Registers on page 11)
                              PC16550D Data Sheet (Successor, for optional FIFO buffer, page 16)

                              Member Enumeration Documentation

                              enum Serial::ComPort

                              COM-Port.

                              The serial interface and its hardware addresses. Modern desktop PCs have, at most, a single, physical COM-port (COM1)

                              enum Serial::BaudRate

                              Transmission speed.

                              The unit Baud describes the transmission speed in number of symbols per seconds. 1 Baud therefore equals the transmission of 1 symbol per second. The possible Baud rates are whole-number dividers of the clock frequency of 115200 Hz..

                              Constructor & Destructor Documentation

                              Serial::Serial ( ComPort  port = COM1,
                              BaudRate  baud_rate = BAUD_115200,
                              DataBits  data_bits = DATA_8BIT,
                              StopBits  stop_bits = STOP_1BIT,
                              Parity  parity = PARITY_NONE 
                              )
                              explicit

                              Constructor.

                              Creates a Serial object that encapsulates the used COM port, as well as the parameters used for the serial connection. Default values are 8N1 (8 bit, no parity bit, one stop bit) with 115200 Baud using COM1.

                              Member Function Documentation

                              int Serial::read ( bool  blocking = true)

                              Read one byte from the serial interface.

                              Parameters
                              blockingIf set, read() blocks until one byte was read
                              Returns
                              Value read from serial interface (or -1 if non-blocking and no data ready)
                              int Serial::write ( char  out,
                              bool  blocking = true 
                              )

                              Write one byte to the serial interface.

                              Parameters
                              outByte to be written
                              blockingIf set, write() blocks until the byte was written
                              Returns
                              Byte written (or -1 if writing byte failed)

                              The documentation for this class was generated from the following files:
                              • machine/serial.h
                              • machine/serial.cc
                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

                              Schlossplatz 4
                              91054 Erlangen
                              • Impressum
                              • Datenschutz
                              • Barrierefreiheit
                              • Facebook
                              • RSS Feed
                              • Xing
                              Nach oben