Skip to content

Commit c7c4a84

Browse files
committed
stm: Update to compile with latest changes to core py.
1 parent a3f94e0 commit c7c4a84

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

stm/audio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ mp_obj_t pyb_audio_dma(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) {
127127
if (type->buffer_p.get_buffer == NULL) {
128128
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "buffer argument must support buffer protocol"));
129129
}
130-
buffer_info_t bufinfo;
131-
type->buffer_p.get_buffer(args[1], &bufinfo, BUFFER_READ);
130+
mp_buffer_info_t bufinfo;
131+
type->buffer_p.get_buffer(args[1], &bufinfo, MP_BUFFER_READ);
132132

133133
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE);
134134

stm/exti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static void exti_load_attr(mp_obj_t self_in, qstr attr_qstr, mp_obj_t *dest) {
283283
static mp_obj_t exti_call(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
284284
// type_in == exti_obj_type
285285

286-
mp_check_nargs(n_args, 4, 4, n_kw, 0);
286+
mp_arg_check_num(n_args, n_kw, 4, 4, 0);
287287

288288
exti_obj_t *self = m_new_obj(exti_obj_t);
289289
self->base.type = type_in;

stm/math.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ typedef union {
1818
};
1919
} double_s_t;
2020

21+
double __attribute__((pcs("aapcs"))) __aeabi_i2d(int32_t x) {
22+
return (float)x;
23+
}
24+
2125
double __attribute__((pcs("aapcs"))) __aeabi_f2d(float x) {
2226
float_s_t fx={0};
2327
double_s_t dx={0};

stm/pin_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void pin_map_obj_print(void (*print)(void *env, const char *fmt, ...), vo
6868

6969
static mp_obj_t pin_map_call(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_t *args) {
7070
pin_map_obj_t *self = self_in;
71-
mp_check_nargs(n_args, 1, 2, n_kw, false);
71+
mp_arg_check_num(n_args, n_kw, 1, 2, false);
7272

7373
if (n_args > 1) {
7474
if (!self->map_dict) {

0 commit comments

Comments
 (0)