Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
card10
micropython
Commits
5ae95865
Commit
5ae95865
authored
Nov 1, 2017
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
teensy: Get port compiling without any warnings.
parent
80e3f07e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ports/teensy/teensy_hal.c
+1
-0
1 addition, 0 deletions
ports/teensy/teensy_hal.c
ports/teensy/uart.c
+2
-0
2 additions, 0 deletions
ports/teensy/uart.c
with
3 additions
and
0 deletions
ports/teensy/teensy_hal.c
+
1
−
0
View file @
5ae95865
...
@@ -49,6 +49,7 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) {
...
@@ -49,6 +49,7 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) {
void
mp_hal_stdout_tx_strn_cooked
(
const
char
*
str
,
size_t
len
)
{
void
mp_hal_stdout_tx_strn_cooked
(
const
char
*
str
,
size_t
len
)
{
// send stdout to UART and USB CDC VCP
// send stdout to UART and USB CDC VCP
if
(
MP_STATE_PORT
(
pyb_stdio_uart
)
!=
NULL
)
{
if
(
MP_STATE_PORT
(
pyb_stdio_uart
)
!=
NULL
)
{
void
uart_tx_strn_cooked
(
pyb_uart_obj_t
*
uart_obj
,
const
char
*
str
,
uint
len
);
uart_tx_strn_cooked
(
MP_STATE_PORT
(
pyb_stdio_uart
),
str
,
len
);
uart_tx_strn_cooked
(
MP_STATE_PORT
(
pyb_stdio_uart
),
str
,
len
);
}
}
if
(
usb_vcp_is_enabled
())
{
if
(
usb_vcp_is_enabled
())
{
...
...
This diff is collapsed.
Click to expand it.
ports/teensy/uart.c
+
2
−
0
View file @
5ae95865
...
@@ -426,11 +426,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_uart_send_obj, 1, pyb_uart_send);
...
@@ -426,11 +426,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_uart_send_obj, 1, pyb_uart_send);
///
///
/// Return value: if `recv` is an integer then a new buffer of the bytes received,
/// Return value: if `recv` is an integer then a new buffer of the bytes received,
/// otherwise the same buffer that was passed in to `recv`.
/// otherwise the same buffer that was passed in to `recv`.
#if 0
STATIC const mp_arg_t pyb_uart_recv_args[] = {
STATIC const mp_arg_t pyb_uart_recv_args[] = {
{ MP_QSTR_recv, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
{ MP_QSTR_recv, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
{ MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 5000} },
{ MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 5000} },
};
};
#define PYB_UART_RECV_NUM_ARGS MP_ARRAY_SIZE(pyb_uart_recv_args)
#define PYB_UART_RECV_NUM_ARGS MP_ARRAY_SIZE(pyb_uart_recv_args)
#endif
STATIC
mp_obj_t
pyb_uart_recv
(
uint
n_args
,
const
mp_obj_t
*
args
,
mp_map_t
*
kw_args
)
{
STATIC
mp_obj_t
pyb_uart_recv
(
uint
n_args
,
const
mp_obj_t
*
args
,
mp_map_t
*
kw_args
)
{
// TODO assumes transmission size is 8-bits wide
// TODO assumes transmission size is 8-bits wide
...
...
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