Skip to content

Commit

Permalink
使用text区存储各个handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-kirisame committed Mar 16, 2020
1 parent 1b4fb1b commit 59225a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions usb/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,33 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "endpoints.h"
// #include <stdio.h>

const __CODE void (*EndpointPacketOutHandler[5])(void) = {
typedef void (*handler_t)(void);

const __CODE handler_t EndpointPacketOutHandler[5] = {
USB_OUT_EP0,
USB_OUT_EP1,
USB_OUT_EP2,
USB_OUT_EP3,
USB_OUT_EP4
};

const __CODE void (*EndpointPacketInHandler[5])(void) = {
const __CODE handler_t EndpointPacketInHandler[5] = {
USB_IN_EP0,
USB_IN_EP1,
USB_IN_EP2,
USB_IN_EP3,
USB_IN_EP4
};

const __CODE void (*EndpointPacketSetupHandler[5])(void) = {
const __CODE handler_t EndpointPacketSetupHandler[5] = {
USB_SETUP_EP0,
USB_SETUP_EP1,
USB_SETUP_EP2,
USB_SETUP_EP3,
USB_SETUP_EP4
};

const __CODE void (*EndpointPacketSofHandler[5])(void) = {
const __CODE handler_t EndpointPacketSofHandler[5] = {
USB_SOF_EP0,
USB_SOF_EP1,
USB_SOF_EP2,
Expand Down

0 comments on commit 59225a4

Please sign in to comment.