OpenBIC
OpenSource Bridge-IC
plat_gpio.c File Reference
#include <zephyr.h>
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "cmsis_os.h"
#include "hal_gpio.h"
#include "plat_gpio.h"
#include "plat_isr.h"
#include "plat_class.h"
Include dependency graph for plat_gpio.c:

Macros

#define gpio_name_to_num(x)   #x,
 

Functions

 LOG_MODULE_REGISTER (plat_gpio)
 
void init_board_rev_gpio ()
 
void update_gpio_cfg_name ()
 
bool pal_load_gpio_config (void)
 

Variables

char * gpio_name []
 
char * update_gpio_name []
 
GPIO_CFG plat_gpio_cfg []
 
GPIO_CFG update_gpio_cfg []
 

Macro Definition Documentation

◆ gpio_name_to_num

#define gpio_name_to_num (   x)    #x,

Function Documentation

◆ init_board_rev_gpio()

void init_board_rev_gpio ( )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_gpio  )

◆ pal_load_gpio_config()

bool pal_load_gpio_config ( void  )
Here is the call graph for this function:

◆ update_gpio_cfg_name()

void update_gpio_cfg_name ( )
Here is the call graph for this function:

Variable Documentation

◆ gpio_name

char* gpio_name[]
Initial value:
= {
}
#define name_gpioO
Definition: plat_gpio.h:157
#define name_gpioK
Definition: plat_gpio.h:120
#define name_gpioH
Definition: plat_gpio.h:93
#define name_gpioQ
Definition: plat_gpio.h:176
#define name_gpioR
Definition: plat_gpio.h:185
#define name_gpioP
Definition: plat_gpio.h:166
#define name_gpioE
Definition: plat_gpio.h:66
#define name_gpioL
Definition: plat_gpio.h:129
#define name_gpioC
Definition: plat_gpio.h:48
#define name_gpioD
Definition: plat_gpio.h:57
#define name_gpioT
Definition: plat_gpio.h:205
#define name_gpioN
Definition: plat_gpio.h:148
#define name_gpioM
Definition: plat_gpio.h:139
#define name_gpioI
Definition: plat_gpio.h:102
#define name_gpioB
Definition: plat_gpio.h:39
#define name_gpioJ
Definition: plat_gpio.h:111
#define name_gpioA
Definition: plat_gpio.h:30
#define name_gpioG
Definition: plat_gpio.h:84
#define name_gpioS
Definition: plat_gpio.h:195
#define name_gpioU
Definition: plat_gpio.h:215
@ name_gpioF
Definition: plat_gpio.h:176

◆ plat_gpio_cfg

GPIO_CFG plat_gpio_cfg[]

◆ update_gpio_cfg

GPIO_CFG update_gpio_cfg[]
Initial value:
= {
{ CHIP_GPIO, 0, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_PMBUS_ALERT },
{ CHIP_GPIO, 4, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL1_ALERT },
{ CHIP_GPIO, 10, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL4_ALERT },
{ CHIP_GPIO, 11, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL5_ALERT },
{ CHIP_GPIO, 12, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL6_ALERT },
{ CHIP_GPIO, 19, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL7_ALERT },
{ CHIP_GPIO, 30, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 44, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 45, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 46, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 88, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 89, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 90, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 91, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 92, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 93, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 94, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 95, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 97, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 99, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 100, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 101, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 127, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL10_ALERT },
{ CHIP_GPIO, 131, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL11_ALERT },
{ CHIP_GPIO, 132, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL12_ALERT },
{ CHIP_GPIO, 145, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL8_ALERT },
{ CHIP_GPIO, 146, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_EDGE_BOTH, ISR_P12V_ACCL9_ALERT },
}
void ISR_P12V_ACCL8_ALERT()
void ISR_P12V_ACCL1_ALERT()
void ISR_P12V_ACCL10_ALERT()
void ISR_P12V_ACCL12_ALERT()
void ISR_P12V_ACCL4_ALERT()
void ISR_P12V_ACCL11_ALERT()
void ISR_P12V_ACCL5_ALERT()
void ISR_P12V_ACCL7_ALERT()
void ISR_PMBUS_ALERT()
void ISR_P12V_ACCL9_ALERT()
void ISR_P12V_ACCL6_ALERT()
#define GPIO_LOW
Definition: hal_gpio.h:72
#define OPEN_DRAIN
Definition: hal_gpio.h:76
#define ENABLE
Definition: hal_gpio.h:68
#define GPIO_HIGH
Definition: hal_gpio.h:73
#define DISABLE
Definition: hal_gpio.h:69
#define CHIP_GPIO
Definition: hal_gpio.h:70
#define PUSH_PULL
Definition: hal_gpio.h:77

◆ update_gpio_name

char* update_gpio_name[]
Initial value:
= {
}
#define update_name_gpioL
Definition: plat_gpio.h:279
#define update_name_gpioM
Definition: plat_gpio.h:289
#define update_name_gpioP
Definition: plat_gpio.h:299
#define update_name_gpioC
Definition: plat_gpio.h:259
#define update_name_gpioD
Definition: plat_gpio.h:269
#define update_name_gpioB
Definition: plat_gpio.h:249
#define update_name_gpioS
Definition: plat_gpio.h:319
#define update_name_gpioQ
Definition: plat_gpio.h:309
#define update_name_gpioA
Definition: plat_gpio.h:239