Modify place where INTR_REQ_USB is defined.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2017-11-13 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* mcu/usb-stm32f103.c (usb_lld_init): Set up interrupt on errors.
|
||||||
|
|
||||||
|
* usb_lld.h (USB_EVENT_DEVICE_WAKEUP): New.
|
||||||
|
(INTR_REQ_USB): Define here.
|
||||||
|
* mcu/usb-usbip.c, example-cdc/usb-cdc.c,
|
||||||
|
example-fraucheky/main.c, example-fs-bb48/usb-cdc.c: Change
|
||||||
|
for INTR_REQ_USB.
|
||||||
|
|
||||||
2017-11-10 NIIBE Yutaka <gniibe@fsij.org>
|
2017-11-10 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* chopstx-cortex-m.c (svc): Replace stack top to TP.
|
* chopstx-cortex-m.c (svc): Replace stack top to TP.
|
||||||
|
|||||||
@@ -629,8 +629,6 @@ usb_rx_ready (uint8_t ep_num, uint16_t len)
|
|||||||
|
|
||||||
static void *tty_main (void *arg);
|
static void *tty_main (void *arg);
|
||||||
|
|
||||||
#include <signal.h>
|
|
||||||
#define INTR_REQ_USB SIGUSR1
|
|
||||||
#define PRIO_TTY 4
|
#define PRIO_TTY 4
|
||||||
|
|
||||||
static char __process3_stack_base__[4096];
|
static char __process3_stack_base__[4096];
|
||||||
|
|||||||
@@ -639,7 +639,6 @@ usb_rx_ready (uint8_t ep_num, uint16_t len)
|
|||||||
|
|
||||||
static void *tty_main (void *arg);
|
static void *tty_main (void *arg);
|
||||||
|
|
||||||
#define INTR_REQ_USB 20
|
|
||||||
#define PRIO_TTY 4
|
#define PRIO_TTY 4
|
||||||
|
|
||||||
#define STACK_PROCESS_3
|
#define STACK_PROCESS_3
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ static void usb_tx_done (uint8_t ep_num, uint16_t len);
|
|||||||
static void usb_rx_ready (uint8_t ep_num, uint16_t len);
|
static void usb_rx_ready (uint8_t ep_num, uint16_t len);
|
||||||
|
|
||||||
|
|
||||||
#define INTR_REQ_USB SIGUSR1
|
|
||||||
#define PRIO_USB 3
|
#define PRIO_USB 3
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
|||||||
@@ -626,7 +626,6 @@ usb_rx_ready (uint8_t ep_num, uint16_t len)
|
|||||||
|
|
||||||
static void *tty_main (void *arg);
|
static void *tty_main (void *arg);
|
||||||
|
|
||||||
#define INTR_REQ_USB 24
|
|
||||||
#define PRIO_TTY 4
|
#define PRIO_TTY 4
|
||||||
|
|
||||||
extern uint8_t __process3_stack_base__[], __process3_stack_size__[];
|
extern uint8_t __process3_stack_base__[], __process3_stack_size__[];
|
||||||
|
|||||||
@@ -339,7 +339,8 @@ void usb_lld_init (struct usb_dev *dev, uint8_t feature)
|
|||||||
|
|
||||||
/* Clear Interrupt Status Register, and enable interrupt for USB */
|
/* Clear Interrupt Status Register, and enable interrupt for USB */
|
||||||
st103_set_istr (0);
|
st103_set_istr (0);
|
||||||
st103_set_cntr (CNTR_CTRM | CNTR_RESETM);
|
st103_set_cntr (CNTR_CTRM | CNTR_OVRM | CNTR_ERRM
|
||||||
|
| CNTR_RESETM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void usb_lld_prepare_shutdown (void)
|
void usb_lld_prepare_shutdown (void)
|
||||||
|
|||||||
@@ -1458,9 +1458,8 @@ read_data_transaction (struct usb_control *usbc_p,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void chx_handle_intr (uint32_t irq_num);
|
extern void chx_handle_intr (uint32_t irq_num);
|
||||||
|
|
||||||
#define INTR_REQ_USB SIGUSR1
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usb_intr (int signum, siginfo_t *siginfo, void *arg)
|
usb_intr (int signum, siginfo_t *siginfo, void *arg)
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ enum {
|
|||||||
/* Device reset and suspend. */
|
/* Device reset and suspend. */
|
||||||
USB_EVENT_DEVICE_RESET,
|
USB_EVENT_DEVICE_RESET,
|
||||||
USB_EVENT_DEVICE_SUSPEND,
|
USB_EVENT_DEVICE_SUSPEND,
|
||||||
|
USB_EVENT_DEVICE_WAKEUP,
|
||||||
/* Device Requests (Control WRITE Transfer): Standard */
|
/* Device Requests (Control WRITE Transfer): Standard */
|
||||||
USB_EVENT_SET_CONFIGURATION,
|
USB_EVENT_SET_CONFIGURATION,
|
||||||
USB_EVENT_SET_INTERFACE,
|
USB_EVENT_SET_INTERFACE,
|
||||||
@@ -135,12 +136,15 @@ void usb_lld_prepare_shutdown (void);
|
|||||||
void usb_lld_shutdown (void);
|
void usb_lld_shutdown (void);
|
||||||
|
|
||||||
#if defined(MCU_KINETIS_L)
|
#if defined(MCU_KINETIS_L)
|
||||||
|
#define INTR_REQ_USB 24
|
||||||
void usb_lld_tx_enable_buf (int ep_num, const void *buf, size_t len);
|
void usb_lld_tx_enable_buf (int ep_num, const void *buf, size_t len);
|
||||||
void usb_lld_rx_enable_buf (int ep_num, void *buf, size_t len);
|
void usb_lld_rx_enable_buf (int ep_num, void *buf, size_t len);
|
||||||
|
|
||||||
void usb_lld_setup_endp (struct usb_dev *dev, int ep_num, int rx_en, int tx_en);
|
void usb_lld_setup_endp (struct usb_dev *dev, int ep_num, int rx_en, int tx_en);
|
||||||
void usb_lld_stall (int ep_num);
|
void usb_lld_stall (int ep_num);
|
||||||
#elif defined(GNU_LINUX_EMULATION)
|
#elif defined(GNU_LINUX_EMULATION)
|
||||||
|
#include <signal.h>
|
||||||
|
#define INTR_REQ_USB SIGUSR1
|
||||||
void usb_lld_tx_enable_buf (int ep_num, const void *buf, size_t len);
|
void usb_lld_tx_enable_buf (int ep_num, const void *buf, size_t len);
|
||||||
void usb_lld_rx_enable_buf (int ep_num, void *buf, size_t len);
|
void usb_lld_rx_enable_buf (int ep_num, void *buf, size_t len);
|
||||||
|
|
||||||
@@ -148,6 +152,7 @@ void usb_lld_setup_endp (struct usb_dev *dev, int ep_num, int rx_en, int tx_en);
|
|||||||
void usb_lld_stall_tx (int ep_num);
|
void usb_lld_stall_tx (int ep_num);
|
||||||
void usb_lld_stall_rx (int ep_num);
|
void usb_lld_stall_rx (int ep_num);
|
||||||
#else
|
#else
|
||||||
|
#define INTR_REQ_USB 20
|
||||||
/* EP_TYPE[1:0] EndPoint TYPE */
|
/* EP_TYPE[1:0] EndPoint TYPE */
|
||||||
#define EP_BULK (0x0000) /* EndPoint BULK */
|
#define EP_BULK (0x0000) /* EndPoint BULK */
|
||||||
#define EP_CONTROL (0x0200) /* EndPoint CONTROL */
|
#define EP_CONTROL (0x0200) /* EndPoint CONTROL */
|
||||||
|
|||||||
Reference in New Issue
Block a user