Commit fec2b757 authored by schneider's avatar schneider
Browse files

fix(pycardium): Fixes for v1.17

parent eef3d0f3
Pipeline #5282 passed with stages
in 46 seconds
......@@ -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/ "$@"
......
......@@ -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(
......
......@@ -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"
......
......@@ -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);
......
......@@ -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
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment