coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ww_ring_programs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * This is a driver for the Whirlwind LED ring, which is equipped with two LED
5  * microcontrollers TI LP55231 (http://www.ti.com/product/lp55231), each of
6  * them driving three multicolor LEDs.
7  *
8  * The only connection between the ring and the main board is an i2c bus.
9  *
10  * This driver imitates a depthcharge display device. On initialization the
11  * driver sets up the controllers to prepare them to accept programs to run.
12  *
13  * When a certain vboot state needs to be indicated, the program for that
14  * state is loaded into the controllers, resulting in the state appropriate
15  * LED behavior.
16  */
17 
18 #ifndef __THIRD_PARTY_COREBOOT_SRC_DRIVERS_I2C_WW_RING_WW_RING_PROGRAMS_H__
19 #define __THIRD_PARTY_COREBOOT_SRC_DRIVERS_I2C_WW_RING_WW_RING_PROGRAMS_H__
20 
21 #include <stdint.h>
23 
24 /* There are three independent engines/cores in the controller. */
25 #define LP55231_NUM_OF_ENGINES 3
26 
27 /* Number of lp55321 controllers on the ring */
28 #define WW_RING_NUM_LED_CONTROLLERS 1
29 
30 /*
31  * Structure to describe an lp55231 program: pointer to the text of the
32  * program, its size and load address (load addr + size should not exceed
33  * LP55231_MAX_PROG_SIZE), and start addresses for all of the three
34  * engines.
35  */
36 typedef struct {
40  uint8_t engine_start_addr[LP55231_NUM_OF_ENGINES];
42 
43 /* A structure to bind controller programs to a vboot state. */
44 typedef struct {
45  enum display_pattern led_pattern;
48 
49 extern const WwRingStateProg wwr_state_programs[];
50 
51 #endif
unsigned char uint8_t
Definition: stdint.h:8
const uint8_t * program_text
display_pattern
Definition: ww_ring.h:10
#define LP55231_NUM_OF_ENGINES
#define WW_RING_NUM_LED_CONTROLLERS
const WwRingStateProg wwr_state_programs[]