Skip to content

Commit

Permalink
samd: Simplify the pin-af-table handling.
Browse files Browse the repository at this point in the history
- The pin-af-table-SAMDxx.csv file are moved to the variants
  directories with the name as pin-af-table.csv.
- The handling in Makefile and pin_af.c is simplified.
  • Loading branch information
robert-hh committed Jun 19, 2022
1 parent 32dcc69 commit c1bfa48
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions ports/samd/Makefile
Expand Up @@ -47,7 +47,7 @@ INC += -I$(TOP)/lib/asf4/$(MCU_SERIES_LOWER)/include/pio
INC += -I$(TOP)/lib/tinyusb/src

MAKE_PIN_AF = boards/make-pin-af.py
PIN_AF_TABLE_CSV = boards/pin-af-table-$(MCU_SERIES).csv
PIN_AF_TABLE_CSV = variants/$(MCU_SERIES_LOWER)/pin-af-table.csv
GEN_PIN_AF = pin_af_table.c

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

LDFLAGS = -nostdlib $(addprefix -T,$(LD_FILES)) -Map=$@.map --cref
LDFLAGS += $(LDFLAGS_MOD)
Expand Down
2 changes: 1 addition & 1 deletion ports/samd/pin_af.c
Expand Up @@ -38,7 +38,7 @@

extern const uint8_t tcc_channel_count[];

#include PIN_AF_TABLE_C
#include "pin_af_table.c"

// Just look for an table entry for a given pin and raise an error
// in case of no match (which should not happen).
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c1bfa48

Please sign in to comment.