Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
fec2b757
Commit
fec2b757
authored
Sep 19, 2021
by
schneider
Browse files
fix(pycardium): Fixes for v1.17
parent
eef3d0f3
Pipeline
#5282
passed with stages
in 46 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bootstrap.sh
View file @
fec2b757
...
...
@@ -5,6 +5,7 @@ cd "$(dirname "$0")"
test
-d
build/
&&
rm
-r
build/
# Get external libs (MicroPython, tiny-AES-c, SHA256)
git submodule deinit
--all
git submodule update
--init
./lib
meson
--cross-file
card10-cross.ini build/
"
$@
"
...
...
lib/micropython/meson.build
View file @
fec2b757
...
...
@@ -50,7 +50,7 @@ micropython_gen_frozen = [
# Sources
micropython_includes = include_directories(
'./micropython/',
'./micropython/
lib/utils
',
'./micropython/
shared/runtime/
',
'./micropython/extmod/',
)
...
...
@@ -175,10 +175,10 @@ micropython_sources = files(
)
micropython_additional_sources = files(
'micropython/
lib/utils
/stdout_helpers.c',
'micropython/
lib/utils
/pyexec.c',
'micropython/
lib/mp-
readline/readline.c',
'micropython/
lib
/timeutils/timeutils.c'
'micropython/
shared/runtime
/stdout_helpers.c',
'micropython/
shared/runtime
/pyexec.c',
'micropython/
shared/
readline/readline.c',
'micropython/
shared
/timeutils/timeutils.c'
)
micropython_extmod_sources = files(
...
...
pycardium/main.c
View file @
fec2b757
...
...
@@ -6,8 +6,8 @@
#include "max32665.h"
#include "
lib/utils
/pyexec.h"
#include "
lib/mp-
readline/readline.h"
#include "
shared/runtime
/pyexec.h"
#include "
shared/
readline/readline.h"
#include "py/gc.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
...
...
pycardium/modules/modbluetooth_card10.c
View file @
fec2b757
...
...
@@ -679,7 +679,10 @@ int mp_bluetooth_gatts_read(
}
// Write a value to the local gatts db (ready to be queried by a central).
int
mp_bluetooth_gatts_write
(
uint16_t
value_handle
,
const
uint8_t
*
value
,
size_t
value_len
uint16_t
value_handle
,
const
uint8_t
*
value
,
size_t
value_len
,
bool
send_update
)
{
// TODO: which return value to choose?
mp_bluetooth_gatts_db_write
(
GATTS_DB
,
value_handle
,
value
,
value_len
);
...
...
pycardium/modules/utime.c
View file @
fec2b757
...
...
@@ -14,7 +14,7 @@
#include <stdlib.h>
// Needs to be after the stdint include ...
#include "
lib
/timeutils/timeutils.h"
#include "
shared
/timeutils/timeutils.h"
/* MicroPython has its epoch at 2000-01-01. Our RTC is in UTC */
#define EPOCH_OFFSET 946684800UL
...
...
pycardium/mphalport.c
View file @
fec2b757
...
...
@@ -128,14 +128,7 @@ intptr_t _sbrk(int incr)
void
epic_isr_ctrl_c
(
void
)
{
/* Taken from lib/micropython/micropython/lib/utils/interrupt_char.c */
MP_STATE_VM
(
mp_pending_exception
)
=
MP_OBJ_FROM_PTR
(
&
MP_STATE_VM
(
mp_kbd_exception
));
#if MICROPY_ENABLE_SCHEDULER
if
(
MP_STATE_VM
(
sched_state
)
==
MP_SCHED_IDLE
)
{
MP_STATE_VM
(
sched_state
)
=
MP_SCHED_PENDING
;
}
#endif
mp_sched_keyboard_interrupt
();
}
void
mp_hal_set_interrupt_char
(
char
c
)
...
...
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