YB_Platform/EVMY/driver/src/hw_gpio.s.c
xinxin.li f9960a4e8c 1. modify gpio funciton for jesd version;
2. verified case: case21, case34, case44
2023-08-26 12:36:10 +08:00

26 lines
712 B
C

#include "hw_gpio.h"
#include "dw_apb_gpio.h"
#include "ucp_utility.h"
#include "ucp_param.h"
#if 0
void hw_gpio_init()
{
do_write(RF_LVDS_PMUX0_REG_ADDR, (do_read_volatile(RF_LVDS_PMUX0_REG_ADDR)|0x00030000)); // pinmux, GPIO1B8, gpio func, 0x3
do_write(GPIO1B_DIR_REG_ADDR, (do_read_volatile(GPIO1B_DIR_REG_ADDR)|(BIT25|BIT24|BIT8|BIT7|BIT6|BIT5|BIT4))); // GPIO1B8, output, 10ms trigger for phy
}
#endif
void rfm1_set_trigger_high()
{
do_write(GPIO1B_DATA_REG_ADDR, (do_read_volatile(GPIO1B_DATA_REG_ADDR)|BIT8)); // GPIO1B8, high
}
void rfm1_set_trigger_low()
{
do_write(GPIO1B_DATA_REG_ADDR, (do_read_volatile(GPIO1B_DATA_REG_ADDR)&(~(BIT8)))); // GPIO1B8, low
}