Skip to content

Commit

Permalink
add pirkey and itsybitsy m0
Browse files Browse the repository at this point in the history
change dotstar brightness to account for new 'dimmer' apa102's
update makefile to not use py3
  • Loading branch information
ladyada committed Feb 6, 2018
1 parent 1705e7a commit 7f65491
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ $(SELF_EXECUTABLE): $(SELF_OBJECTS)
-T$(SELF_LINKER_SCRIPT) \
-Wl,-Map,$(BUILD_PATH)/update-$(NAME).map -o $(BUILD_PATH)/update-$(NAME).elf $(SELF_OBJECTS)
arm-none-eabi-objcopy -O binary $(BUILD_PATH)/update-$(NAME).elf $(BUILD_PATH)/update-$(NAME).bin
python lib/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $(BUILD_PATH)/update-$(NAME).bin
python2 lib/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $(BUILD_PATH)/update-$(NAME).bin

$(BUILD_PATH)/%.o: src/%.c $(wildcard inc/*.h boards/*/*.h) $(BUILD_PATH)/uf2_version.h
echo "$<"
Expand All @@ -138,7 +138,7 @@ $(BUILD_PATH)/%.o: $(BUILD_PATH)/%.c
$(CC) $(CFLAGS) $(BLD_EXTA_FLAGS) $(INCLUDES) $< -o $@

$(BUILD_PATH)/selfdata.c: $(EXECUTABLE) scripts/gendata.py src/sketch.cpp
python scripts/gendata.py $(BOOTLOADER_SIZE) $(EXECUTABLE)
python2 scripts/gendata.py $(BOOTLOADER_SIZE) $(EXECUTABLE)

clean:
rm -rf build
Expand Down
2 changes: 2 additions & 0 deletions boards/itsybitsy_m0/board.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHIP_FAMILY = samd21
CHIP_VARIANT = SAMD21G18A
20 changes: 20 additions & 0 deletions boards/itsybitsy_m0/board_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H

#define __SAMD21G18A__ 1

#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "ItsyBitsy M0 Express"
#define VOLUME_LABEL "ITSYBOOT"
#define INDEX_URL "http://adafru.it/3727"
#define BOARD_ID "SAMD21G18A-ItsyBitsy-v0"

#define USB_VID 0x239A
#define USB_PID 0x000F

#define LED_PIN PIN_PA17

#define BOARD_RGBLED_CLOCK_PIN PIN_PA00
#define BOARD_RGBLED_DATA_PIN PIN_PA01

#endif
2 changes: 2 additions & 0 deletions boards/pirkey/board.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHIP_FAMILY = samd21
CHIP_VARIANT = SAMD21E18A
23 changes: 23 additions & 0 deletions boards/pirkey/board_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H

#define __SAMD21E18A__ 1
#define CRYSTALLESS 1

#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "pIRKey"
#define VOLUME_LABEL "PIRKEYBOOT"
#define INDEX_URL "http://adafru.it/"
#define BOARD_ID "SAMD21E18A-pIRKey-v0"

#define USB_VID 0x239A
#define USB_PID 0x0027

#define LED_PIN PIN_PA02 // not actually connected
//#define LED_TX_PIN PIN_PA27
//#define LED_RX_PIN PIN_PB03

#define BOARD_RGBLED_CLOCK_PIN PIN_PA01
#define BOARD_RGBLED_DATA_PIN PIN_PA00

#endif
8 changes: 4 additions & 4 deletions inc/uf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
#define COLOR_UART 0x040400
#define COLOR_LEAVE 0x000000
#else
#define COLOR_START 0x00000A
#define COLOR_USB 0x000A00
#define COLOR_UART 0x0A0A00
#define COLOR_LEAVE 0x0A000A
#define COLOR_START 0x000040
#define COLOR_USB 0x004000
#define COLOR_UART 0x404000
#define COLOR_LEAVE 0x400040
#endif

/*
Expand Down

0 comments on commit 7f65491

Please sign in to comment.