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
87f068d7
Commit
87f068d7
authored
Mar 26, 2017
by
Damien George
Browse files
cc3200: Update to use size_t for tuple/list accessors.
parent
46e98d9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/modutime.c
View file @
87f068d7
...
...
@@ -102,7 +102,7 @@ STATIC mp_obj_t time_localtime(mp_uint_t n_args, const mp_obj_t *args) {
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
time_localtime_obj
,
0
,
1
,
time_localtime
);
STATIC
mp_obj_t
time_mktime
(
mp_obj_t
tuple
)
{
mp_uint
_t
len
;
size
_t
len
;
mp_obj_t
*
elem
;
mp_obj_get_array
(
tuple
,
&
len
,
&
elem
);
...
...
cc3200/mods/pybrtc.c
View file @
87f068d7
...
...
@@ -196,7 +196,7 @@ STATIC uint pyb_rtc_datetime_s_us(const mp_obj_t datetime, uint32_t *seconds) {
// set date and time
mp_obj_t
*
items
;
uin
t
len
;
size_
t
len
;
mp_obj_get_array
(
datetime
,
&
len
,
&
items
);
// verify the tuple
...
...
cc3200/mods/pybuart.c
View file @
87f068d7
...
...
@@ -388,7 +388,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, const mp_arg_val_t *a
uint
flowcontrol
=
UART_FLOWCONTROL_NONE
;
if
(
pins_o
!=
mp_const_none
)
{
mp_obj_t
*
pins
;
mp_uint
_t
n_pins
=
2
;
size
_t
n_pins
=
2
;
if
(
pins_o
==
MP_OBJ_NULL
)
{
// use the default pins
pins
=
(
mp_obj_t
*
)
pyb_uart_def_pin
[
self
->
uart_id
];
...
...
@@ -454,7 +454,7 @@ STATIC mp_obj_t pyb_uart_make_new(const mp_obj_type_t *type, size_t n_args, size
if
(
args
[
0
].
u_obj
==
MP_OBJ_NULL
)
{
if
(
args
[
5
].
u_obj
!=
MP_OBJ_NULL
)
{
mp_obj_t
*
pins
;
mp_uint
_t
n_pins
=
2
;
size
_t
n_pins
=
2
;
mp_obj_get_array
(
args
[
5
].
u_obj
,
&
n_pins
,
&
pins
);
// check the Tx pin (or the Rx if Tx is None)
if
(
pins
[
0
]
==
mp_const_none
)
{
...
...
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