Removed old motor_shim module

This commit is contained in:
ZodiusInfuser 2022-05-10 18:35:33 +01:00
parent b26d13bab1
commit c75b35265b
4 changed files with 0 additions and 62 deletions

View File

@ -36,7 +36,6 @@ include(pico_unicorn/micropython)
include(pico_display/micropython)
include(pico_display_2/micropython)
include(pico_explorer/micropython)
include(pico_motor_shim/micropython)
include(pico_wireless/micropython)
include(bitmap_fonts/micropython)

View File

@ -1,18 +0,0 @@
set(MOD_NAME picomotorshim)
string(TOUPPER ${MOD_NAME} MOD_NAME_UPPER)
add_library(usermod_${MOD_NAME} INTERFACE)
target_sources(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/pico_motor_shim.c
)
target_include_directories(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_motor_shim/
)
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
-DMODULE_${MOD_NAME_UPPER}_ENABLED=1
)
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})

View File

@ -1,40 +0,0 @@
#include "pico_motor_shim.h"
/***** Constants *****/
enum pins
{
BUTTON_A = 2,
MOTOR_1_POS = 6,
MOTOR_1_NEG = 7,
MOTOR_2_POS = 27,
MOTOR_2_NEG = 26,
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// picomotorshim Module
////////////////////////////////////////////////////////////////////////////////////////////////////
/***** Globals Table *****/
STATIC const mp_map_elem_t picomotorshim_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_picomotorshim) },
{ MP_ROM_QSTR(MP_QSTR_PIN_BUTTON_A), MP_ROM_INT(BUTTON_A) },
{ MP_ROM_QSTR(MP_QSTR_PIN_MOTOR_1_POS), MP_ROM_INT(MOTOR_1_POS) },
{ MP_ROM_QSTR(MP_QSTR_PIN_MOTOR_1_NEG), MP_ROM_INT(MOTOR_1_NEG) },
{ MP_ROM_QSTR(MP_QSTR_PIN_MOTOR_2_POS), MP_ROM_INT(MOTOR_2_POS) },
{ MP_ROM_QSTR(MP_QSTR_PIN_MOTOR_2_NEG), MP_ROM_INT(MOTOR_2_NEG) },
};
STATIC MP_DEFINE_CONST_DICT(mp_module_picomotorshim_globals, picomotorshim_globals_table);
/***** Module Definition *****/
const mp_obj_module_t picomotorshim_user_cmodule = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_picomotorshim_globals,
};
////////////////////////////////////////////////////////////////////////////////////////////////////
MP_REGISTER_MODULE(MP_QSTR_picomotorshim, picomotorshim_user_cmodule, MODULE_PICOMOTORSHIM_ENABLED);
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,3 +0,0 @@
// Include MicroPython API.
#include "py/runtime.h"
#include "py/objstr.h"