coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio_ftns.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <gpio.h>
4 #include "gpio_ftns.h"
5 
6 int get_spd_offset(void)
7 {
8  u8 index = 0;
9  /*
10  * One SPD file contains all 4 options, determine which index to
11  * read here, then call into the standard routines.
12  */
13  if (gpio_get(GPIO_49))
14  index |= 1 << 0;
15  if (gpio_get(GPIO_50))
16  index |= 1 << 1;
17 
18  return index;
19 }
int get_spd_offset(void)
Definition: gpio_ftns.c:25
#define GPIO_49
Definition: gpio_ftns.h:17
#define GPIO_50
Definition: gpio_ftns.h:18
int gpio_get(gpio_t gpio)
Definition: gpio.c:166
uint8_t u8
Definition: stdint.h:45