Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
940708d0
Verified
Commit
940708d0
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
fix(epicardium): Reenable cdcacm
parent
6f8e69c3
No related branches found
No related tags found
No related merge requests found
Pipeline
#927
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
epicardium/cdcacm.c
+12
-0
12 additions, 0 deletions
epicardium/cdcacm.c
epicardium/serial.c
+5
-1
5 additions, 1 deletion
epicardium/serial.c
with
17 additions
and
1 deletion
epicardium/cdcacm.c
+
12
−
0
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
);
}
}
/******************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
epicardium/serial.c
+
5
−
1
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
());
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment