diff --git a/main.c b/main.c index 4d34e451dd..dbd367a596 100755 --- a/main.c +++ b/main.c @@ -82,7 +82,7 @@ #endif #if CIRCUITPY_CANIO -#include "common-hal/_canio/CAN.h" +#include "common-hal/canio/CAN.h" #endif void do_str(const char *src, mp_parse_input_kind_t input_kind) { diff --git a/ports/atmel-samd/common-hal/_canio/CAN.c b/ports/atmel-samd/common-hal/canio/CAN.c similarity index 99% rename from ports/atmel-samd/common-hal/_canio/CAN.c rename to ports/atmel-samd/common-hal/canio/CAN.c index 0d967d7cae..01cc03dea5 100644 --- a/ports/atmel-samd/common-hal/_canio/CAN.c +++ b/ports/atmel-samd/common-hal/canio/CAN.c @@ -31,7 +31,7 @@ #include "peripheral_clk_config.h" -#include "common-hal/_canio/CAN.h" +#include "common-hal/canio/CAN.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/util.h" #include "supervisor/port.h" diff --git a/ports/atmel-samd/common-hal/_canio/CAN.h b/ports/atmel-samd/common-hal/canio/CAN.h similarity index 91% rename from ports/atmel-samd/common-hal/_canio/CAN.h rename to ports/atmel-samd/common-hal/canio/CAN.h index 1cc34e3ac0..cdea60e7d0 100644 --- a/ports/atmel-samd/common-hal/_canio/CAN.h +++ b/ports/atmel-samd/common-hal/canio/CAN.h @@ -27,12 +27,12 @@ #pragma once #include "py/obj.h" -#include "shared-bindings/_canio/__init__.h" -#include "shared-bindings/_canio/CAN.h" +#include "shared-bindings/canio/__init__.h" +#include "shared-bindings/canio/CAN.h" #include "component/can.h" #include "common-hal/microcontroller/Pin.h" -#include "common-hal/_canio/__init__.h" -#include "shared-module/_canio/Message.h" +#include "common-hal/canio/__init__.h" +#include "shared-module/canio/Message.h" #define COMMON_HAL_CAN_RX_FIFO_LEN (2) #define COMMON_HAL_CAN_TX_FIFO_LEN (2) diff --git a/ports/atmel-samd/common-hal/_canio/Listener.c b/ports/atmel-samd/common-hal/canio/Listener.c similarity index 99% rename from ports/atmel-samd/common-hal/_canio/Listener.c rename to ports/atmel-samd/common-hal/canio/Listener.c index 0a5f629f88..bf8b3288dc 100644 --- a/ports/atmel-samd/common-hal/_canio/Listener.c +++ b/ports/atmel-samd/common-hal/canio/Listener.c @@ -30,8 +30,8 @@ #include "py/obj.h" #include "py/runtime.h" -#include "common-hal/_canio/__init__.h" -#include "common-hal/_canio/Listener.h" +#include "common-hal/canio/__init__.h" +#include "common-hal/canio/Listener.h" #include "shared-bindings/util.h" #include "supervisor/shared/tick.h" #include "component/can.h" diff --git a/ports/atmel-samd/common-hal/_canio/Listener.h b/ports/atmel-samd/common-hal/canio/Listener.h similarity index 96% rename from ports/atmel-samd/common-hal/_canio/Listener.h rename to ports/atmel-samd/common-hal/canio/Listener.h index cc6770e6e5..a51a9fc379 100644 --- a/ports/atmel-samd/common-hal/_canio/Listener.h +++ b/ports/atmel-samd/common-hal/canio/Listener.h @@ -26,8 +26,8 @@ #pragma once -#include "common-hal/_canio/CAN.h" -#include "shared-module/_canio/Match.h" +#include "common-hal/canio/CAN.h" +#include "shared-module/canio/Match.h" typedef struct { __IO CAN_RXF0C_Type RXFC; /**< \brief (R/W 32) Rx FIFO n Configuration */ diff --git a/ports/atmel-samd/common-hal/_canio/__init__.c b/ports/atmel-samd/common-hal/canio/__init__.c similarity index 100% rename from ports/atmel-samd/common-hal/_canio/__init__.c rename to ports/atmel-samd/common-hal/canio/__init__.c diff --git a/ports/atmel-samd/common-hal/_canio/__init__.h b/ports/atmel-samd/common-hal/canio/__init__.h similarity index 100% rename from ports/atmel-samd/common-hal/_canio/__init__.h rename to ports/atmel-samd/common-hal/canio/__init__.h diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 2614dc011f..98fa7a5f2c 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -143,7 +143,7 @@ ifeq ($(CIRCUITPY_CAMERA),1) SRC_PATTERNS += camera/% endif ifeq ($(CIRCUITPY_CANIO),1) -SRC_PATTERNS += _canio/% +SRC_PATTERNS += canio/% endif ifeq ($(CIRCUITPY_COUNTIO),1) SRC_PATTERNS += countio/% @@ -318,9 +318,9 @@ SRC_COMMON_HAL_ALL = \ busio/__init__.c \ camera/__init__.c \ camera/Camera.c \ - _canio/CAN.c \ - _canio/Listener.c \ - _canio/__init__.c \ + canio/CAN.c \ + canio/Listener.c \ + canio/__init__.c \ countio/Counter.c \ countio/__init__.c \ digitalio/DigitalInOut.c \ @@ -390,7 +390,7 @@ $(filter $(SRC_PATTERNS), \ _bleio/Address.c \ _bleio/Attribute.c \ _bleio/ScanEntry.c \ - _canio/Match.c \ + canio/Match.c \ _eve/__init__.c \ camera/ImageFormat.c \ digitalio/Direction.c \ @@ -409,8 +409,8 @@ SRC_SHARED_MODULE_ALL = \ _bleio/Attribute.c \ _bleio/ScanEntry.c \ _bleio/ScanResults.c \ - _canio/Match.c \ - _canio/Message.c \ + canio/Match.c \ + canio/Message.c \ _eve/__init__.c \ _pixelbuf/PixelBuf.c \ _pixelbuf/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index d1b12f3544..0583ae1c97 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -338,7 +338,7 @@ extern const struct _mp_obj_module_t camera_module; #if CIRCUITPY_CANIO extern const struct _mp_obj_module_t canio_module; -#define CANIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__canio), (mp_obj_t)&canio_module }, +#define CANIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_canio), (mp_obj_t)&canio_module }, #else #define CANIO_MODULE #endif diff --git a/shared-bindings/_canio/CAN.c b/shared-bindings/canio/CAN.c similarity index 98% rename from shared-bindings/_canio/CAN.c rename to shared-bindings/canio/CAN.c index 38aed85d33..482d11546d 100644 --- a/shared-bindings/_canio/CAN.c +++ b/shared-bindings/canio/CAN.c @@ -25,13 +25,13 @@ */ #include "py/enum.h" -#include "common-hal/_canio/CAN.h" -#include "common-hal/_canio/Listener.h" -#include "shared-bindings/_canio/__init__.h" -#include "shared-bindings/_canio/CAN.h" -#include "shared-bindings/_canio/Listener.h" -#include "shared-bindings/_canio/Match.h" -#include "shared-bindings/_canio/Message.h" +#include "common-hal/canio/CAN.h" +#include "common-hal/canio/Listener.h" +#include "shared-bindings/canio/__init__.h" +#include "shared-bindings/canio/CAN.h" +#include "shared-bindings/canio/Listener.h" +#include "shared-bindings/canio/Match.h" +#include "shared-bindings/canio/Message.h" #include "shared-bindings/microcontroller/Pin.h" #include "py/objproperty.h" diff --git a/shared-bindings/_canio/CAN.h b/shared-bindings/canio/CAN.h similarity index 98% rename from shared-bindings/_canio/CAN.h rename to shared-bindings/canio/CAN.h index c591c8e6ba..66c972c285 100644 --- a/shared-bindings/_canio/CAN.h +++ b/shared-bindings/canio/CAN.h @@ -28,7 +28,7 @@ #include "py/obj.h" #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/_canio/Message.h" +#include "shared-bindings/canio/Message.h" extern const mp_obj_type_t canio_can_type; diff --git a/shared-bindings/_canio/Listener.c b/shared-bindings/canio/Listener.c similarity index 98% rename from shared-bindings/_canio/Listener.c rename to shared-bindings/canio/Listener.c index 6186f3bbdb..0b50e58358 100644 --- a/shared-bindings/_canio/Listener.c +++ b/shared-bindings/canio/Listener.c @@ -24,9 +24,9 @@ * THE SOFTWARE. */ -#include "shared-bindings/_canio/Listener.h" -#include "shared-bindings/_canio/Message.h" -#include "common-hal/_canio/Listener.h" +#include "shared-bindings/canio/Listener.h" +#include "shared-bindings/canio/Message.h" +#include "common-hal/canio/Listener.h" #include "py/runtime.h" #include "py/objproperty.h" diff --git a/shared-bindings/_canio/Listener.h b/shared-bindings/canio/Listener.h similarity index 100% rename from shared-bindings/_canio/Listener.h rename to shared-bindings/canio/Listener.h diff --git a/shared-bindings/_canio/Match.c b/shared-bindings/canio/Match.c similarity index 99% rename from shared-bindings/_canio/Match.c rename to shared-bindings/canio/Match.c index 4ff35906b7..ff5d028fad 100644 --- a/shared-bindings/_canio/Match.c +++ b/shared-bindings/canio/Match.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/_canio/Match.h" +#include "shared-bindings/canio/Match.h" #include "py/objproperty.h" #include "py/runtime.h" diff --git a/shared-bindings/_canio/Match.h b/shared-bindings/canio/Match.h similarity index 97% rename from shared-bindings/_canio/Match.h rename to shared-bindings/canio/Match.h index 5522c26367..88996d730f 100644 --- a/shared-bindings/_canio/Match.h +++ b/shared-bindings/canio/Match.h @@ -27,7 +27,7 @@ #pragma once #include "py/obj.h" -#include "shared-module/_canio/Match.h" +#include "shared-module/canio/Match.h" extern const mp_obj_type_t canio_match_type; diff --git a/shared-bindings/_canio/Message.c b/shared-bindings/canio/Message.c similarity index 99% rename from shared-bindings/_canio/Message.c rename to shared-bindings/canio/Message.c index 487ac9bfd1..11de6ded92 100644 --- a/shared-bindings/_canio/Message.c +++ b/shared-bindings/canio/Message.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/_canio/Message.h" +#include "shared-bindings/canio/Message.h" #include "py/obj.h" #include "py/objproperty.h" diff --git a/shared-bindings/_canio/Message.h b/shared-bindings/canio/Message.h similarity index 98% rename from shared-bindings/_canio/Message.h rename to shared-bindings/canio/Message.h index ed739af0d4..34b632e847 100644 --- a/shared-bindings/_canio/Message.h +++ b/shared-bindings/canio/Message.h @@ -27,7 +27,7 @@ #pragma once #include "py/obj.h" -#include "shared-module/_canio/Message.h" +#include "shared-module/canio/Message.h" extern const mp_obj_type_t canio_message_type; diff --git a/shared-bindings/_canio/__init__.c b/shared-bindings/canio/__init__.c similarity index 95% rename from shared-bindings/_canio/__init__.c rename to shared-bindings/canio/__init__.c index 29e43c5c46..bc191913d7 100644 --- a/shared-bindings/_canio/__init__.c +++ b/shared-bindings/canio/__init__.c @@ -60,11 +60,11 @@ #include "py/obj.h" #include "py/enum.h" -#include "shared-bindings/_canio/__init__.h" -#include "shared-bindings/_canio/CAN.h" -#include "shared-bindings/_canio/Match.h" -#include "shared-bindings/_canio/Message.h" -#include "shared-bindings/_canio/Listener.h" +#include "shared-bindings/canio/__init__.h" +#include "shared-bindings/canio/CAN.h" +#include "shared-bindings/canio/Match.h" +#include "shared-bindings/canio/Message.h" +#include "shared-bindings/canio/Listener.h" MAKE_ENUM_VALUE(canio_bus_state_type, bus_state, ERROR_ACTIVE, BUS_STATE_ERROR_ACTIVE); MAKE_ENUM_VALUE(canio_bus_state_type, bus_state, ERROR_PASSIVE, BUS_STATE_ERROR_PASSIVE); diff --git a/shared-bindings/_canio/__init__.h b/shared-bindings/canio/__init__.h similarity index 100% rename from shared-bindings/_canio/__init__.h rename to shared-bindings/canio/__init__.h diff --git a/shared-module/_canio/Match.c b/shared-module/canio/Match.c similarity index 97% rename from shared-module/_canio/Match.c rename to shared-module/canio/Match.c index 3dcde18a78..9e33b956f6 100644 --- a/shared-module/_canio/Match.c +++ b/shared-module/canio/Match.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-module/_canio/Match.h" +#include "shared-module/canio/Match.h" void common_hal_canio_match_construct(canio_match_obj_t *self, int address, int mask, bool extended) { self->address = address; diff --git a/shared-module/_canio/Match.h b/shared-module/canio/Match.h similarity index 100% rename from shared-module/_canio/Match.h rename to shared-module/canio/Match.h diff --git a/shared-module/_canio/Message.c b/shared-module/canio/Message.c similarity index 98% rename from shared-module/_canio/Message.c rename to shared-module/canio/Message.c index a02bd01276..b8ebb78596 100644 --- a/shared-module/_canio/Message.c +++ b/shared-module/canio/Message.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-module/_canio/Message.h" +#include "shared-module/canio/Message.h" #include diff --git a/shared-module/_canio/Message.h b/shared-module/canio/Message.h similarity index 100% rename from shared-module/_canio/Message.h rename to shared-module/canio/Message.h