Skip to content
Snippets Groups Projects
Commit fec2b757 authored by schneider's avatar schneider
Browse files

fix(pycardium): Fixes for v1.17

parent eef3d0f3
No related branches found
No related tags found
1 merge request!486Update to microptyhon v1.17
Pipeline #5282 passed
...@@ -5,6 +5,7 @@ cd "$(dirname "$0")" ...@@ -5,6 +5,7 @@ cd "$(dirname "$0")"
test -d build/ && rm -r build/ test -d build/ && rm -r build/
# Get external libs (MicroPython, tiny-AES-c, SHA256) # Get external libs (MicroPython, tiny-AES-c, SHA256)
git submodule deinit --all
git submodule update --init ./lib git submodule update --init ./lib
meson --cross-file card10-cross.ini build/ "$@" meson --cross-file card10-cross.ini build/ "$@"
......
...@@ -50,7 +50,7 @@ micropython_gen_frozen = [ ...@@ -50,7 +50,7 @@ micropython_gen_frozen = [
# Sources # Sources
micropython_includes = include_directories( micropython_includes = include_directories(
'./micropython/', './micropython/',
'./micropython/lib/utils', './micropython/shared/runtime/',
'./micropython/extmod/', './micropython/extmod/',
) )
...@@ -175,10 +175,10 @@ micropython_sources = files( ...@@ -175,10 +175,10 @@ micropython_sources = files(
) )
micropython_additional_sources = files( micropython_additional_sources = files(
'micropython/lib/utils/stdout_helpers.c', 'micropython/shared/runtime/stdout_helpers.c',
'micropython/lib/utils/pyexec.c', 'micropython/shared/runtime/pyexec.c',
'micropython/lib/mp-readline/readline.c', 'micropython/shared/readline/readline.c',
'micropython/lib/timeutils/timeutils.c' 'micropython/shared/timeutils/timeutils.c'
) )
micropython_extmod_sources = files( micropython_extmod_sources = files(
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include "max32665.h" #include "max32665.h"
#include "lib/utils/pyexec.h" #include "shared/runtime/pyexec.h"
#include "lib/mp-readline/readline.h" #include "shared/readline/readline.h"
#include "py/gc.h" #include "py/gc.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "py/stackctrl.h" #include "py/stackctrl.h"
......
...@@ -679,7 +679,10 @@ int mp_bluetooth_gatts_read( ...@@ -679,7 +679,10 @@ int mp_bluetooth_gatts_read(
} }
// Write a value to the local gatts db (ready to be queried by a central). // Write a value to the local gatts db (ready to be queried by a central).
int mp_bluetooth_gatts_write( 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? // TODO: which return value to choose?
mp_bluetooth_gatts_db_write(GATTS_DB, value_handle, value, value_len); mp_bluetooth_gatts_db_write(GATTS_DB, value_handle, value, value_len);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <stdlib.h> #include <stdlib.h>
// Needs to be after the stdint include ... // 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 */ /* MicroPython has its epoch at 2000-01-01. Our RTC is in UTC */
#define EPOCH_OFFSET 946684800UL #define EPOCH_OFFSET 946684800UL
......
...@@ -128,14 +128,7 @@ intptr_t _sbrk(int incr) ...@@ -128,14 +128,7 @@ intptr_t _sbrk(int incr)
void epic_isr_ctrl_c(void) void epic_isr_ctrl_c(void)
{ {
/* Taken from lib/micropython/micropython/lib/utils/interrupt_char.c */ mp_sched_keyboard_interrupt();
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
} }
void mp_hal_set_interrupt_char(char c) void mp_hal_set_interrupt_char(char c)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment