• 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
      • Embedded Systems Software
      • 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
  • System-Level Programming
    • Lecture
      • Exercises
        • Slides
        • Assignments
        • libspicboard-doc
          • Linux libc-doc
          • Exam
            • Intern
              • Contact

            libspicboard-doc

            Files | Enumerations | Functions
            LED access

            Interface to the board's 8 LEDs. More...

            Files

            file  led.h
             

            Enumerations

            enum  LED {
              RED0 , YELLOW0 , GREEN0 , BLUE0 ,
              RED1 , YELLOW1 , GREEN1 , BLUE1
            }
             LED identifiers. More...
             

            Functions

            int8_t sb_led_on (LED led)
             Activates a specific LED. More...
             
            int8_t sb_led_off (LED led)
             Deactivates a specific LED. More...
             
            int8_t sb_led_toggle (LED led)
             Toggles a specific LED. More...
             
            int8_t sb_led_showLevel (uint8_t level, uint8_t max)
             Uses the LED array as a level indicator. More...
             
            void sb_led_setMask (uint8_t mask)
             Sets all LEDs according to a bitfield. More...
             

            Detailed Description

            Interface to the board's 8 LEDs.

            Enumeration Type Documentation

            enum LED

            LED identifiers.

            Enumerator
            RED0 

            Upper red led

            YELLOW0 

            Upper yellow led

            GREEN0 

            Upper green led

            BLUE0 

            Upper blue led

            RED1 

            Lower red led

            YELLOW1 

            Lower yellow led

            GREEN1 

            Lower green led

            BLUE1 

            Lower blue led

            Function Documentation

            int8_t sb_led_off ( LED  led)

            Deactivates a specific LED.

            Parameters
            ledLED ID
            Returns
            0 on success, negative value on error
            Return values
            0success
            -1invalid LED ID
            int8_t sb_led_on ( LED  led)

            Activates a specific LED.

            Parameters
            ledLED ID
            Returns
            0 on success, negative value on error
            Return values
            0success
            -1invalid LED ID
            void sb_led_setMask ( uint8_t  mask)

            Sets all LEDs according to a bitfield.

            The bitfield contains one bit for each LED (the least significant bit corresponds to RED0, the most significant bit BLUE1). A set bit enables and a cleared bit disables the corresponding LED.

            Parameters
            mask8-bit bitfield describing the desired LED states
            int8_t sb_led_showLevel ( uint8_t  level,
            uint8_t  max 
            )

            Uses the LED array as a level indicator.

            Allows the array of LEDs to be used as a (fill) level, progress or similar indicator. The 8 LEDs are used to display a ratio of a max-value<=255 in 9 steps.

            Parameters
            levellevel value
            maxmaximum possible value
            Returns
            the number of LEDs turned on on success, negative value on error
            Return values
            >=0success
            -1level exceeds max
            -2max is 0
            int8_t sb_led_toggle ( LED  led)

            Toggles a specific LED.

            Parameters
            ledLED ID
            Returns
            0 on success, negative value on error
            Return values
            0success
            -1invalid LED ID
            Friedrich-Alexander-Universität
            Erlangen-Nürnberg

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