README.LED 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Status LED
  2. ========================================
  3. This README describes the status LED API.
  4. The API is defined by the include file include/status_led.h
  5. The first step is to define CONFIG_STATUS_LED in the board config file.
  6. If the LED support is only for a single board, define CONFIG_BOARD_SPECIFIC_LED
  7. in the board config file.
  8. At a minimum, these macros must be defined at
  9. STATUS_LED_BIT
  10. STATUS_LED_STATE
  11. STATUS_LED_PERIOD
  12. If there are multiple status LED's define
  13. STATUS_LED_BIT<n>
  14. STATUS_LED_STATE<n>
  15. STATUS_LED_PERIOD<n>
  16. Where <n> can a integer 1 through 3.
  17. STATUS_LED_BIT is passed into the __led_* functions to identify which LED is
  18. being acted on. As such, the value choose must be unique with with respect to
  19. the other STATUS_LED_BIT's. Mapping the value to a physical LED is the
  20. reponsiblity of the __led_* function.
  21. STATUS_LED_STATE is the initial state of the LED. It should be set to one of
  22. these values: STATUS_LED_OFF or STATUS_LED_ON.
  23. STATUS_LED_PERIOD is how long is the LED blink period. This usually set to
  24. (CONFIG_SYS_HZ / <N>) where <N> is the frequency of the blink. Typical values
  25. range from 2 to 10.
  26. Some other LED macros
  27. STATUS_LED_BOOT is the LED to light when the board is booting. This must be a
  28. valid STATUS_LED_BIT value.
  29. STATUS_LED_RED is the red LED. It is used signal errors. This must be a valid
  30. STATUS_LED_BIT value. Other similar color LED's are STATUS_LED_YELLOW and
  31. STATUS_LED_BLUE.
  32. These board must define these functions
  33. __led_init is called once to initialize the LED to STATUS_LED_STATE. One time
  34. start up code should be placed here.
  35. __led_set is called to change the state of the LED.
  36. __led_toggle is called to toggle the current state of the LED.
  37. Colour LED
  38. ========================================
  39. Colour LED's are at present only used by ARM.
  40. The functions names explain their purpose.
  41. coloured_LED_init
  42. red_LED_on
  43. red_LED_off
  44. green_LED_on
  45. green_LED_off
  46. yellow_LED_on
  47. yellow_LED_off
  48. blue_LED_on
  49. blue_LED_off
  50. These are weakly defined in lib_arm/board.c to noops. Where applicable, define
  51. these functions in the board specific source.
  52. TBD : Describe older board dependent macros similar to what is done for
  53. CONFIG_TQM8xxL.
  54. TBD : Describe general support via asm/status_led.h