stmhal/teensy: Use _ instead of - in source file names.

Trying to move towards consistency, let's use _ exclusively in names of
source files (eg .c, .h, .csv).
nlr-macros
Damien George 2014-08-08 22:34:06 +01:00
parent 4b67463be1
commit 284efa89ae
9 changed files with 15 additions and 15 deletions

View File

@ -224,12 +224,12 @@ $(BUILD)/firmware.elf: $(OBJ)
MAKE_PINS = boards/make-pins.py
BOARD_PINS = boards/$(BOARD)/pins.csv
AF_FILE = boards/stm32f4xx-af.csv
PREFIX_FILE = boards/stm32f4xx-prefix.c
AF_FILE = boards/stm32f4xx_af.csv
PREFIX_FILE = boards/stm32f4xx_prefix.c
GEN_PINS_SRC = $(BUILD)/pins_$(BOARD).c
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
GEN_PINS_QSTR = $(BUILD)/pins_qstr.h
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins-af-const.h
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins_af_const.h
INSERT_USB_IDS = ../tools/insert-usb-ids.py
FILE2H = ../tools/file2h.py
@ -250,7 +250,7 @@ $(BUILD)/main.o: $(GEN_CDCINF_HEADER)
# Use a pattern rule here so that make will only call make-pins.py once to make
# both pins_$(BOARD).c and pins.h
$(BUILD)/%_$(BOARD).c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%-af-const.h $(BUILD)/%_qstr.h: boards/$(BOARD)/%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
$(BUILD)/%_$(BOARD).c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(BUILD)/%_qstr.h: boards/$(BOARD)/%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
$(ECHO) "Create $@"
$(Q)$(PYTHON) $(MAKE_PINS) --board $(BOARD_PINS) --af $(AF_FILE) --prefix $(PREFIX_FILE) --hdr $(GEN_PINS_HDR) --qstr $(GEN_PINS_QSTR) --af-const $(GEN_PINS_AF_CONST) > $(GEN_PINS_SRC)

View File

@ -326,13 +326,13 @@ def main():
"-a", "--af",
dest="af_filename",
help="Specifies the alternate function file for the chip",
default="stm32f4xx-af.csv"
default="stm32f4xx_af.csv"
)
parser.add_argument(
"--af-const",
dest="af_const_filename",
help="Specifies header file for alternate function constants.",
default="build/pins-af-const.h"
default="build/pins_af_const.h"
)
parser.add_argument(
"-b", "--board",
@ -343,13 +343,13 @@ def main():
"-p", "--prefix",
dest="prefix_filename",
help="Specifies beginning portion of generated pins file",
default="stm32f4xx-prefix.c"
default="stm32f4xx_prefix.c"
)
parser.add_argument(
"-q", "--qstr",
dest="qstr_filename",
help="Specifies name of generated qstr header file",
default="build/pins-qstr.h"
default="build/pins_qstr.h"
)
parser.add_argument(
"-r", "--hdr",

View File

@ -1,4 +1,4 @@
// stm32fxx-prefix.c becomes the initial portion of the generated pins file.
// stm32f4xx_prefix.c becomes the initial portion of the generated pins file.
#include <stdio.h>
#include <stdint.h>

View File

@ -534,7 +534,7 @@ STATIC const mp_map_elem_t pin_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_PULL_UP), MP_OBJ_NEW_SMALL_INT(GPIO_PULLUP) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PULL_DOWN), MP_OBJ_NEW_SMALL_INT(GPIO_PULLDOWN) },
#include "genhdr/pins-af-const.h"
#include "genhdr/pins_af_const.h"
};
STATIC MP_DEFINE_CONST_DICT(pin_locals_dict, pin_locals_dict_table);

View File

@ -133,13 +133,13 @@ $(BUILD)/%.hex: $(BUILD)/%.elf
$(Q)$(OBJCOPY) -O ihex -R .eeprom "$<" "$@"
MAKE_PINS = make-pins.py
BOARD_PINS = teensy-pins.csv
AF_FILE = mk20dx256-af.csv
PREFIX_FILE = mk20dx256-prefix.c
BOARD_PINS = teensy_pins.csv
AF_FILE = mk20dx256_af.csv
PREFIX_FILE = mk20dx256_prefix.c
GEN_PINS_SRC = $(BUILD)/pins_gen.c
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
GEN_PINS_QSTR = $(BUILD)/pins_qstr.h
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins-af-const.h
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins_af_const.h
# Making OBJ use an order-only depenedency on the generated pins.h file
# has the side effect of making the pins.h file before we actually compile
@ -150,7 +150,7 @@ $(OBJ): | $(HEADER_BUILD)/pins.h
# Use a pattern rule here so that make will only call make-pins.py once to make
# both pins_$(BOARD).c and pins.h
$(BUILD)/%_gen.c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%-af-const.h $(BUILD)/%_qstr.h: teensy-%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
$(BUILD)/%_gen.c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(BUILD)/%_qstr.h: teensy_%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
$(ECHO) "Create $@"
$(Q)$(PYTHON) $(MAKE_PINS) --board $(BOARD_PINS) --af $(AF_FILE) --prefix $(PREFIX_FILE) --hdr $(GEN_PINS_HDR) --qstr $(GEN_PINS_QSTR) --af-const $(GEN_PINS_AF_CONST) > $(GEN_PINS_SRC)