summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorRadomir Dopieralski <openstack@sheep.art.pl>2019-03-01 14:59:21 +0100
committerRadomir Dopieralski <openstack@sheep.art.pl>2019-03-01 14:59:21 +0100
commit45fea86554d42d07360ec16574908bc96c5e37ec (patch)
treedc975ed9cfa9a8532fffbfdd80004d6302a17dfc /ports
parent48f0a5163e6a3a5e44e6df231867b9bc90ce933b (diff)
Rebase on top of CircuitPython 4.x
Diffstat (limited to 'ports')
-rw-r--r--ports/atmel-samd/boards/pewpew10/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pewpew10/mpconfigboard.mk9
-rw-r--r--ports/atmel-samd/boards/pewpew10/pins.c2
-rw-r--r--ports/atmel-samd/timer_handler.c12
-rw-r--r--ports/atmel-samd/timer_handler.h1
5 files changed, 21 insertions, 5 deletions
diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h
index 3fd1cbce1..09618431b 100644
--- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h
@@ -7,8 +7,6 @@
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
-#include "internal_flash.h"
-
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk
index cf3004a4d..eeb5632ef 100644
--- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk
@@ -11,3 +11,12 @@ CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21
FROZEN_MPY_DIRS += $(TOP)/frozen/pewpew10
+
+CIRCUITPY_PEW = 1
+CIRCUITPY_ANALOGIO = 1
+CIRCUITPY_MATH = 0
+CIRCUITPY_NEOPIXEL_WRITE = 1
+CIRCUITPY_RTC = 0
+CIRCUITPY_SAMD = 0
+CIRCUITPY_USB_MIDI = 0
+CIRCUITPY_SMALL_BUILD = 1
diff --git a/ports/atmel-samd/boards/pewpew10/pins.c b/ports/atmel-samd/boards/pewpew10/pins.c
index 499e6270b..082394d17 100644
--- a/ports/atmel-samd/boards/pewpew10/pins.c
+++ b/ports/atmel-samd/boards/pewpew10/pins.c
@@ -1,6 +1,6 @@
#include "shared-bindings/board/__init__.h"
-#include "board_busses.h"
+#include "supervisor/shared/board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_PA05) },
diff --git a/ports/atmel-samd/timer_handler.c b/ports/atmel-samd/timer_handler.c
index 26f984d96..ac162329e 100644
--- a/ports/atmel-samd/timer_handler.c
+++ b/ports/atmel-samd/timer_handler.c
@@ -30,6 +30,7 @@
#include "timer_handler.h"
#include "common-hal/pulseio/PulseOut.h"
+#include "shared-module/_pew/PewPew.h"
static uint8_t tc_handler[TC_INST_NUM];
@@ -44,8 +45,15 @@ void shared_timer_handler(bool is_tc, uint8_t index) {
// Make sure to add the handler #define to timer_handler.h
if (is_tc) {
uint8_t handler = tc_handler[index];
- if (handler == TC_HANDLER_PULSEOUT) {
- pulseout_interrupt_handler(index);
+ switch(handler) {
+ case TC_HANDLER_PULSEOUT:
+ pulseout_interrupt_handler(index);
+ break;
+ case TC_HANDLER_PEW:
+ pewpew_interrupt_handler(index);
+ break;
+ default:
+ break;
}
}
}
diff --git a/ports/atmel-samd/timer_handler.h b/ports/atmel-samd/timer_handler.h
index f7a6e6e0e..e249fca36 100644
--- a/ports/atmel-samd/timer_handler.h
+++ b/ports/atmel-samd/timer_handler.h
@@ -28,6 +28,7 @@
#define TC_HANDLER_NO_INTERRUPT 0x0
#define TC_HANDLER_PULSEOUT 0x1
+#define TC_HANDLER_PEW 0x2
void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler);
void shared_timer_handler(bool is_tc, uint8_t index);