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 is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
e7bee6b3
Commit
e7bee6b3
authored
Jan 16, 2016
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
pic16bit: Minor updates to types to allow port to compile again.
parent
31dd312f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
pic16bit/modpybled.c
+1
-1
1 addition, 1 deletion
pic16bit/modpybled.c
pic16bit/modpybswitch.c
+2
-2
2 additions, 2 deletions
pic16bit/modpybswitch.c
pic16bit/mpconfigport.h
+4
-0
4 additions, 0 deletions
pic16bit/mpconfigport.h
pic16bit/unistd.h
+2
-0
2 additions, 0 deletions
pic16bit/unistd.h
with
9 additions
and
3 deletions
pic16bit/modpybled.c
+
1
−
1
View file @
e7bee6b3
...
@@ -46,7 +46,7 @@ void pyb_led_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t ki
...
@@ -46,7 +46,7 @@ void pyb_led_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t ki
mp_printf
(
print
,
"LED(%u)"
,
LED_ID
(
self
));
mp_printf
(
print
,
"LED(%u)"
,
LED_ID
(
self
));
}
}
STATIC
mp_obj_t
pyb_led_make_new
(
mp_obj_t
type_in
,
mp_uint
_t
n_args
,
mp_uint
_t
n_kw
,
const
mp_obj_t
*
args
)
{
STATIC
mp_obj_t
pyb_led_make_new
(
const
mp_obj_t
ype_t
*
type
,
size
_t
n_args
,
size
_t
n_kw
,
const
mp_obj_t
*
args
)
{
mp_arg_check_num
(
n_args
,
n_kw
,
1
,
1
,
false
);
mp_arg_check_num
(
n_args
,
n_kw
,
1
,
1
,
false
);
mp_int_t
led_id
=
mp_obj_get_int
(
args
[
0
]);
mp_int_t
led_id
=
mp_obj_get_int
(
args
[
0
]);
if
(
!
(
1
<=
led_id
&&
led_id
<=
NUM_LED
))
{
if
(
!
(
1
<=
led_id
&&
led_id
<=
NUM_LED
))
{
...
...
This diff is collapsed.
Click to expand it.
pic16bit/modpybswitch.c
+
2
−
2
View file @
e7bee6b3
...
@@ -45,7 +45,7 @@ void pyb_switch_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
...
@@ -45,7 +45,7 @@ void pyb_switch_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
mp_printf
(
print
,
"Switch(%u)"
,
SWITCH_ID
(
self
));
mp_printf
(
print
,
"Switch(%u)"
,
SWITCH_ID
(
self
));
}
}
STATIC
mp_obj_t
pyb_switch_make_new
(
mp_obj_t
type_in
,
mp_uint
_t
n_args
,
mp_uint
_t
n_kw
,
const
mp_obj_t
*
args
)
{
STATIC
mp_obj_t
pyb_switch_make_new
(
const
mp_obj_t
ype_t
*
type
,
size
_t
n_args
,
size
_t
n_kw
,
const
mp_obj_t
*
args
)
{
mp_arg_check_num
(
n_args
,
n_kw
,
1
,
1
,
false
);
mp_arg_check_num
(
n_args
,
n_kw
,
1
,
1
,
false
);
mp_int_t
sw_id
=
mp_obj_get_int
(
args
[
0
]);
mp_int_t
sw_id
=
mp_obj_get_int
(
args
[
0
]);
if
(
!
(
1
<=
sw_id
&&
sw_id
<=
NUM_SWITCH
))
{
if
(
!
(
1
<=
sw_id
&&
sw_id
<=
NUM_SWITCH
))
{
...
@@ -60,7 +60,7 @@ mp_obj_t pyb_switch_value(mp_obj_t self_in) {
...
@@ -60,7 +60,7 @@ mp_obj_t pyb_switch_value(mp_obj_t self_in) {
}
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
pyb_switch_value_obj
,
pyb_switch_value
);
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
pyb_switch_value_obj
,
pyb_switch_value
);
mp_obj_t
pyb_switch_call
(
mp_obj_t
self_in
,
mp_uint
_t
n_args
,
mp_uint
_t
n_kw
,
const
mp_obj_t
*
args
)
{
mp_obj_t
pyb_switch_call
(
mp_obj_t
self_in
,
size
_t
n_args
,
size
_t
n_kw
,
const
mp_obj_t
*
args
)
{
mp_arg_check_num
(
n_args
,
n_kw
,
0
,
0
,
false
);
mp_arg_check_num
(
n_args
,
n_kw
,
0
,
0
,
false
);
return
pyb_switch_value
(
self_in
);
return
pyb_switch_value
(
self_in
);
}
}
...
...
This diff is collapsed.
Click to expand it.
pic16bit/mpconfigport.h
+
4
−
0
View file @
e7bee6b3
...
@@ -108,3 +108,7 @@ extern const struct _mp_obj_module_t pyb_module;
...
@@ -108,3 +108,7 @@ extern const struct _mp_obj_module_t pyb_module;
#define MICROPY_MPHALPORT_H "pic16bit_mphal.h"
#define MICROPY_MPHALPORT_H "pic16bit_mphal.h"
#define MICROPY_HW_BOARD_NAME "dsPICSK"
#define MICROPY_HW_BOARD_NAME "dsPICSK"
#define MICROPY_HW_MCU_NAME "dsPIC33"
#define MICROPY_HW_MCU_NAME "dsPIC33"
// XC16 toolchain doesn't seem to define these
typedef
int
intptr_t
;
typedef
unsigned
int
uintptr_t
;
This diff is collapsed.
Click to expand it.
pic16bit/unistd.h
+
2
−
0
View file @
e7bee6b3
// XC16 compiler doesn't seem to have unistd.h file
// XC16 compiler doesn't seem to have unistd.h file
#define SEEK_CUR 1
#define SEEK_CUR 1
typedef
int
ssize_t
;
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