Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
db56ad29
Commit
db56ad29
authored
Jul 17, 2014
by
Damien George
Browse files
Merge pull request #754 from dhylands/fix-teensy
Fix teensy to build on latest tree.
parents
dce8876d
4d9dd268
Changes
9
Hide whitespace changes
Inline
Side-by-side
teensy/import.c
View file @
db56ad29
#include
<stdio.h>
#include
<stdint.h>
#include
"misc.h"
#include
"mpconfig.h"
#include
"misc.h"
#include
"qstr.h"
#include
"lexer.h"
...
...
teensy/led.c
View file @
db56ad29
...
...
@@ -31,7 +31,7 @@ STATIC const pyb_led_obj_t pyb_led_obj[] = {
#endif
#endif
};
#define NUM_LEDS ARRAY_SIZE(pyb_led_obj)
#define NUM_LEDS
MP_
ARRAY_SIZE(pyb_led_obj)
void
led_init
(
void
)
{
/* GPIO structure */
...
...
teensy/lexermemzip.c
View file @
db56ad29
#include
<stdint.h>
#include
<stdlib.h>
#include
"misc.h"
#include
"mpconfig.h"
#include
"misc.h"
#include
"qstr.h"
#include
"lexer.h"
#include
"memzip.h"
...
...
teensy/main.c
View file @
db56ad29
...
...
@@ -3,8 +3,8 @@
#include
<string.h>
#include
<stdlib.h>
#include
"misc.h"
#include
"mpconfig.h"
#include
"misc.h"
#include
"qstr.h"
#include
"nlr.h"
#include
"lexer.h"
...
...
teensy/memzip.c
View file @
db56ad29
#include
<stdint.h>
#include
<stdlib.h>
#include
<string.h>
#include
"mpconfigport.h"
#include
"misc.h"
#include
"memzip.h"
...
...
teensy/mk20dx256-prefix.c
View file @
db56ad29
...
...
@@ -6,8 +6,8 @@
#include
"teensy_hal.h"
#include
"misc.h"
#include
"mpconfig.h"
#include
"misc.h"
#include
"qstr.h"
#include
"obj.h"
#include
"pin.h"
...
...
teensy/modpyb.c
View file @
db56ad29
...
...
@@ -29,8 +29,8 @@
#include
<mk20dx128.h>
#include
"Arduino.h"
#include
"misc.h"
#include
"mpconfig.h"
#include
"misc.h"
#include
"teensy_hal.h"
...
...
@@ -328,8 +328,8 @@ STATIC const mp_obj_dict_t pyb_module_globals = {
.
map
=
{
.
all_keys_are_qstrs
=
1
,
.
table_is_fixed_array
=
1
,
.
used
=
ARRAY_SIZE
(
pyb_module_globals_table
),
.
alloc
=
ARRAY_SIZE
(
pyb_module_globals_table
),
.
used
=
MP_
ARRAY_SIZE
(
pyb_module_globals_table
),
.
alloc
=
MP_
ARRAY_SIZE
(
pyb_module_globals_table
),
.
table
=
(
mp_map_elem_t
*
)
pyb_module_globals_table
,
},
};
...
...
teensy/mpconfigport.h
View file @
db56ad29
...
...
@@ -65,6 +65,7 @@ typedef const void *machine_const_ptr_t; // must be of pointer size
// The following would be from a board specific file, if one existed
#define MICROPY_HW_BOARD_NAME "Teensy-3.1"
#define MICROPY_HW_MCU_NAME "MK20DX256"
#define MICROPY_HW_HAS_SWITCH (0)
#define MICROPY_HW_HAS_SDCARD (0)
...
...
teensy/uart.c
View file @
db56ad29
...
...
@@ -290,7 +290,7 @@ STATIC const mp_arg_t pyb_uart_init_args[] = {
{
MP_QSTR_stop
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
1
}
},
{
MP_QSTR_parity
,
MP_ARG_KW_ONLY
|
MP_ARG_OBJ
,
{.
u_obj
=
mp_const_none
}
},
};
#define PYB_UART_INIT_NUM_ARGS ARRAY_SIZE(pyb_uart_init_args)
#define PYB_UART_INIT_NUM_ARGS
MP_
ARRAY_SIZE(pyb_uart_init_args)
STATIC
mp_obj_t
pyb_uart_init_helper
(
pyb_uart_obj_t
*
self
,
uint
n_args
,
const
mp_obj_t
*
args
,
mp_map_t
*
kw_args
)
{
// parse args
...
...
@@ -419,7 +419,7 @@ STATIC const mp_arg_t pyb_uart_send_args[] = {
{
MP_QSTR_send
,
MP_ARG_REQUIRED
|
MP_ARG_OBJ
,
{.
u_obj
=
MP_OBJ_NULL
}
},
{
MP_QSTR_timeout
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
5000
}
},
};
#define PYB_UART_SEND_NUM_ARGS ARRAY_SIZE(pyb_uart_send_args)
#define PYB_UART_SEND_NUM_ARGS
MP_
ARRAY_SIZE(pyb_uart_send_args)
STATIC
mp_obj_t
pyb_uart_send
(
uint
n_args
,
const
mp_obj_t
*
args
,
mp_map_t
*
kw_args
)
{
// TODO assumes transmission size is 8-bits wide
...
...
@@ -465,7 +465,7 @@ 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_timeout
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
5000
}
},
};
#define PYB_UART_RECV_NUM_ARGS ARRAY_SIZE(pyb_uart_recv_args)
#define PYB_UART_RECV_NUM_ARGS
MP_
ARRAY_SIZE(pyb_uart_recv_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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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