26 lines
712 B
C
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
|
|
}
|
|
|
|
|