Skip to content

Commit

Permalink
usb/ehci: add option to set irqthread priority by board_config.h
Browse files Browse the repository at this point in the history
JIRA: NIL-584
  • Loading branch information
nalajcie committed Dec 13, 2024
1 parent 39816a1 commit 50dad54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion usb/ehci/ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@
#include <usbhost.h>
#include <stdio.h>

#include <board_config.h>

#include <hub.h>
#include <hcd.h>

#include "ehci.h"

#define EHCI_PERIODIC_SIZE 128

#ifndef EHCI_PRIO
#define EHCI_PRIO 2
#endif


static inline void ehci_memDmb(void)
{
Expand Down Expand Up @@ -834,7 +840,7 @@ static int ehci_init(hcd_t *hcd)
for (i = 0; i < EHCI_PERIODIC_SIZE; ++i)
ehci->periodicList[i] = QH_PTR_INVALID;

if (beginthread(ehci_irqThread, 2, ehci->stack, sizeof(ehci->stack), hcd) != 0) {
if (beginthread(ehci_irqThread, EHCI_PRIO, ehci->stack, sizeof(ehci->stack), hcd) != 0) {
ehci_free(ehci);
return -ENOMEM;
}
Expand Down

0 comments on commit 50dad54

Please sign in to comment.