Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
940708d0
Verified
Commit
940708d0
authored
Jul 04, 2019
by
Rahix
Browse files
fix(epicardium): Reenable cdcacm
parent
6f8e69c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
epicardium/cdcacm.c
View file @
940708d0
...
...
@@ -172,6 +172,8 @@ void cdcacm_init(void)
/* Start with USB in low power mode */
usb_app_sleep
();
/* TODO: Fix priority */
NVIC_SetPriority
(
USB_IRQn
,
6
);
NVIC_EnableIRQ
(
USB_IRQn
);
}
...
...
@@ -338,9 +340,19 @@ static int usb_read_callback(void)
}
/******************************************************************************/
#include
"FreeRTOS.h"
#include
"task.h"
extern
TaskHandle_t
serial_task_id
;
void
USB_IRQHandler
(
void
)
{
usb_event_handler
();
if
(
serial_task_id
!=
NULL
)
{
BaseType_t
xHigherPriorityTaskWoken
=
pdFALSE
;
vTaskNotifyGiveFromISR
(
serial_task_id
,
&
xHigherPriorityTaskWoken
);
portYIELD_FROM_ISR
(
xHigherPriorityTaskWoken
);
}
}
/******************************************************************************/
...
...
epicardium/serial.c
View file @
940708d0
...
...
@@ -13,7 +13,7 @@
#include
"queue.h"
/* Task ID for the serial handler */
TaskHandle_t
serial_task_id
;
TaskHandle_t
serial_task_id
=
NULL
;
/* The serial console in use (UART0) */
extern
mxc_uart_regs_t
*
ConsoleUart
;
...
...
@@ -109,5 +109,9 @@ void vSerialTask(void*pvParameters)
while
(
UART_NumReadAvail
(
ConsoleUart
)
>
0
)
{
enqueue_char
(
UART_ReadByte
(
ConsoleUart
));
}
while
(
cdcacm_num_read_avail
()
>
0
)
{
enqueue_char
(
cdcacm_read
());
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment