xinxin.li f3ff36cc8c 1. JESD 9.8g, UCP4008_SL_EVB, new feature #1028;
2. cell setup/delete bug, UCP4008_SL_EVB, bug #1071;
3. task delete bug when deleting cell, bug #1061;
4. delete board direction;
5. add some cell setup parameters for FDD mode extend
2023-09-15 14:59:25 +08:00

65 lines
1.0 KiB
C

#ifndef _GPIO_DRV_H_
#define _GPIO_DRV_H_
#include "dw_apb_gpio.h"
#include "typedef.h"
#define JESD_RF_CH_NUM 4
typedef enum _tagGpioLValid
{
LOW_AS_VALID = 0,
HIGH_AS_VALID
}gpioLValid;
typedef enum _tagJesdGpioTRCH
{
JESD_RF_TX = 0,
JESD_RF_RX = 1,
JESD_RF_ORX = 2,
JESD_TRCH_MAXNUM = 3
}jesdGpioTRch;
typedef enum _tagGpioState
{
GPIO_OFF = 0,
GPIO_ON = 1
}jesdGpioState;
typedef struct _tagGpioInfo
{
uint8_t pinId; // 0~31
uint8_t vaFlag; // 0: low as valid; 1: high as valid
}stGpioInfo;
typedef struct _tagGpioJesd
{
stGpioInfo txGpioInfo[JESD_RF_CH_NUM];
stGpioInfo rxGpioInfo[JESD_RF_CH_NUM];
stGpioInfo orxGpioInfo[JESD_RF_CH_NUM];
}stGpioJesd;
typedef struct _tagGpioOnBoard
{
stGpioJesd jesdGpioInfo;
stGpioInfo triggerGpioInfo;
}stGpioOnBoard;
int32_t hw_gpio_init();
int32_t set_jesd_rf_state(uint8_t nTRCh, uint8_t nState);
int32_t set_trigger_state(uint8_t nState);
#if 0
int32_t set_tx_on();
int32_t set_tx_off();
int32_t set_rx_on();
int32_t set_rx_off();
#endif
#endif