- fixed GPIO

git-svn-id: http://moon:8086/svn/mips@194 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-11-23 07:39:17 +00:00
parent 96618e854f
commit 89509e0ee8
6 changed files with 70 additions and 66 deletions
+4 -4
View File
@@ -10,7 +10,7 @@ static volatile uint32_t _g_int_active;
static volatile uint32_t _g_mbx_return;
static volatile uint32_t _g_mbx_in_flag;
extern gpio_if_t _g_gpio;
extern gpio_if_t _g_gpio_usb_data;
// ---------------------------------------------------------
// Globals
@@ -299,7 +299,7 @@ void cy67k3_reset(void)
{
int i;
gpio_write(&_g_gpio, GPIO_0_MASK_USB, GPIO_0_ALIGN_USB, GPIO_DATA_OFFSET, GPIO_0_USB_RST | GPIO_0_USB_INTEN);
gpio_set(&_g_gpio_usb_data, GPIO_0_USB_RST | GPIO_0_USB_INTEN);
for (i=0; i <160; i++)
{
@@ -314,7 +314,7 @@ void cy67k3_reset(void)
);
}
gpio_write(&_g_gpio, GPIO_0_USB_RST, GPIO_0_ALIGN_USB, GPIO_DATA_OFFSET, ~GPIO_0_USB_RST);
gpio_clr(&_g_gpio_usb_data, GPIO_0_USB_RST);
}
@@ -419,7 +419,7 @@ uint32_t hpi_init(void)
interrupt_register(4, cy67k3_isr);
interrupt_enable(4);
gpio_write(&_g_gpio, GPIO_0_USB_INTEN, GPIO_0_ALIGN_USB, GPIO_DATA_OFFSET, GPIO_0_USB_INTEN);
gpio_set(&_g_gpio_usb_data, GPIO_0_USB_INTEN);
return HPI_NOERROR;
}