8000 samd/pin_af: Simplify the pin-af-table handling. · jimmo/micropython@85fb8b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 85fb8b8

Browse files
robert-hhdpgeorge
authored andcommitted
samd/pin_af: Simplify the pin-af-table handling.
Changes are: - The pin-af-table-SAMDxx.csv file are moved to the mcu directories with the name as pin-af-table.csv. - The handling in Makefile and pin_af.c is simplified.
1 parent 20e7313 commit 85fb8b8

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

ports/samd/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ INC += -I$(TOP)/lib/asf4/$(MCU_SERIES_LOWER)/include/pio
4848
INC += -I$(TOP)/lib/tinyusb/src
4949

5050
MAKE_PIN_AF = boards/make-pin-af.py
51-
PIN_AF_TABLE_CSV = boards/pin-af-table-$(MCU_SERIES).csv
51+
PIN_AF_TABLE_CSV = mcu/$(MCU_SERIES_LOWER)/pin-af-table.csv
5252
GEN_PIN_AF = pin_af_table.c
5353

5454
MAKE_PINS = boards/make-pins.py
@@ -62,7 +62,6 @@ CFLAGS = $(INC) -Wall -Werror -std=c99 -nostdlib -mthumb $(CFLAGS_MCU_$(MCU_SERI
6262
CFLAGS += -DMCU_$(MCU_SERIES) -D__$(CMSIS_MCU)__
6363
CFLAGS += $(CFLAGS_MOD) $(CFLAGS_EXTRA)
6464
CFLAGS += -DMPCONFIG_MCU_H='<boards/mpconfig_$(MCU_SERIES_LOWER).h>'
65-
CFLAGS += -DPIN_AF_TABLE_C='<$(BUILD)/$(GEN_PIN_AF)>'
6665

6766
LDFLAGS = -nostdlib $(addprefix -T,$(LD_FILES)) -Map=$@.map --cref
6867
LDFLAGS += $(LDFLAGS_MOD)

ports/samd/boards/pin-af-table-SAMD21.csv renamed to ports/samd/mcu/samd21/pin-af-table.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pa30,10,,,12,10,
5959
pa31,11,,,13,11,
6060
pb30,14,,,50,00,12
6161
pb31,15,,,51,01,13
62-
pb00,0,,,52,70,
63-
pb01,1,,,53,71,
64-
pb02,2,,,50,60,
65-
pb03,3,,,51,61,
62+
pb00,0,8,,52,70,
63+
pb01,1,9,,53,71,
64+
pb02,2,10,,50,60,
65+
pb03,3,11,,51,61,

ports/samd/pin_af.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
extern const uint8_t tcc_channel_count[];
4040

41-
#include PIN_AF_TABLE_C
41+
#include "pin_af_table.c"
4242

4343
// Just look for an table entry for a given pin and raise an error
4444
// in case of no match (which should not happen).

0 commit comments

Comments
 (0)
0