Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stmhal/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ extern const struct _mp_obj_module_t sensor_module;
extern const struct _mp_obj_module_t image_module;
extern const struct _mp_obj_module_t gif_module;
extern const struct _mp_obj_module_t mjpeg_module;
extern const struct _mp_obj_module_t lcd_module;
extern const struct _mp_obj_module_t mlx_module;

#define MICROPY_PORT_BUILTIN_MODULES \
Expand All @@ -126,6 +127,7 @@ extern const struct _mp_obj_module_t mlx_module;
{ MP_OBJ_NEW_QSTR(MP_QSTR_image), (mp_obj_t)&image_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_gif), (mp_obj_t)&gif_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_mjpeg), (mp_obj_t)&mjpeg_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_lcd), (mp_obj_t)&lcd_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_mlx), (mp_obj_t)&mlx_module },

#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
Expand Down
8 changes: 8 additions & 0 deletions stmhal/qstrdefsport.h
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,14 @@ Q(loop)
Q(mjpeg)
Q(Mjpeg)

// Lcd Module
Q(lcd)
Q(type)
Q(set_backlight)
Q(get_backlight)
Q(display)
Q(clear)

// Led Module
Q(led)
Q(RED)
Expand Down
8 changes: 4 additions & 4 deletions stmhal/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ STATIC mp_obj_t pyb_spi_init_helper(const pyb_spi_obj_t *self, mp_uint_t n_args,
///
/// At the moment, the NSS pin is not used by the SPI driver and is free
/// for other use.
STATIC mp_obj_t pyb_spi_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
/*STATIC*/ mp_obj_t pyb_spi_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
// check arguments
mp_arg_check_num(n_args, n_kw, 1, MP_OBJ_FUN_ARGS_MAX, true);

Expand Down Expand Up @@ -413,14 +413,14 @@ STATIC mp_obj_t pyb_spi_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n
return (mp_obj_t)spi_obj;
}

STATIC mp_obj_t pyb_spi_init(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
/*STATIC*/ mp_obj_t pyb_spi_init(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
return pyb_spi_init_helper(args[0], n_args - 1, args + 1, kw_args);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_spi_init_obj, 1, pyb_spi_init);

/// \method deinit()
/// Turn off the SPI bus.
STATIC mp_obj_t pyb_spi_deinit(mp_obj_t self_in) {
/*STATIC*/ mp_obj_t pyb_spi_deinit(mp_obj_t self_in) {
pyb_spi_obj_t *self = self_in;
spi_deinit(self->spi);
return mp_const_none;
Expand All @@ -434,7 +434,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_spi_deinit_obj, pyb_spi_deinit);
/// - `timeout` is the timeout in milliseconds to wait for the send.
///
/// Return value: `None`.
STATIC mp_obj_t pyb_spi_send(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
/*STATIC*/ mp_obj_t pyb_spi_send(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
// TODO assumes transmission size is 8-bits wide

static const mp_arg_t allowed_args[] = {
Expand Down