summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-20 00:15:35 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-20 00:15:35 +0100
commitc7c4a8439735ff7617f78b5b6c0cdfb05ae88656 (patch)
treecfa83ebe2bcb23d2bb90fa522c2e1045e672e0d0
parenta3f94e0030dc209f4d180531878cede7a1e2dbbe (diff)
downloadmicropython-c7c4a8439735ff7617f78b5b6c0cdfb05ae88656.tar.gz
micropython-c7c4a8439735ff7617f78b5b6c0cdfb05ae88656.zip
stm: Update to compile with latest changes to core py.
-rw-r--r--stm/audio.c4
-rw-r--r--stm/exti.c2
-rw-r--r--stm/math.c4
-rw-r--r--stm/pin_map.c2
4 files changed, 8 insertions, 4 deletions
diff --git a/stm/audio.c b/stm/audio.c
index e9e872813a..36fa77c428 100644
--- a/stm/audio.c
+++ b/stm/audio.c
@@ -127,8 +127,8 @@ mp_obj_t pyb_audio_dma(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) {
if (type->buffer_p.get_buffer == NULL) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "buffer argument must support buffer protocol"));
}
- buffer_info_t bufinfo;
- type->buffer_p.get_buffer(args[1], &bufinfo, BUFFER_READ);
+ mp_buffer_info_t bufinfo;
+ type->buffer_p.get_buffer(args[1], &bufinfo, MP_BUFFER_READ);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE);
diff --git a/stm/exti.c b/stm/exti.c
index c6dfd9d1a8..a5d9fc16a7 100644
--- a/stm/exti.c
+++ b/stm/exti.c
@@ -283,7 +283,7 @@ static void exti_load_attr(mp_obj_t self_in, qstr attr_qstr, mp_obj_t *dest) {
static mp_obj_t exti_call(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
// type_in == exti_obj_type
- mp_check_nargs(n_args, 4, 4, n_kw, 0);
+ mp_arg_check_num(n_args, n_kw, 4, 4, 0);
exti_obj_t *self = m_new_obj(exti_obj_t);
self->base.type = type_in;
diff --git a/stm/math.c b/stm/math.c
index 8afdc82a64..e75ec1d4b9 100644
--- a/stm/math.c
+++ b/stm/math.c
@@ -18,6 +18,10 @@ typedef union {
};
} double_s_t;
+double __attribute__((pcs("aapcs"))) __aeabi_i2d(int32_t x) {
+ return (float)x;
+}
+
double __attribute__((pcs("aapcs"))) __aeabi_f2d(float x) {
float_s_t fx={0};
double_s_t dx={0};
diff --git a/stm/pin_map.c b/stm/pin_map.c
index c5754ca33d..bb2c054e78 100644
--- a/stm/pin_map.c
+++ b/stm/pin_map.c
@@ -68,7 +68,7 @@ static void pin_map_obj_print(void (*print)(void *env, const char *fmt, ...), vo
static mp_obj_t pin_map_call(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_t *args) {
pin_map_obj_t *self = self_in;
- mp_check_nargs(n_args, 1, 2, n_kw, false);
+ mp_arg_check_num(n_args, n_kw, 1, 2, false);
if (n_args > 1) {
if (!self->map_dict) {