Skip to content

Commit 62135e1

Browse files
committed
Remove HW_VER option from build and FW source
Because `master` branch will only support one hardware - the one in development. Each released version will be in separate branch thus is not affected by changes in the master branch.
1 parent 7edfa76 commit 62135e1

File tree

11 files changed

+8
-24
lines changed

11 files changed

+8
-24
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ all:
1616
include build/gcc_rules.mk
1717
include build/fw/config.mk
1818

19-
ifeq ($(and $(clock), $(machine), $(COMPILER), $(ARCH), $(HW_VER)),)
19+
ifeq ($(and $(clock), $(machine), $(COMPILER), $(ARCH)),)
2020
$(error Invalid build setup. Required variables are not set)
2121
endif
2222

build/fw/config.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ ARCH := avr
33
machine ?= atmega8a
44
clock ?= 16000000
55
DEBUG := 1
6-
HW_VER := 1

build/fw/toolchain_avr_gcc.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ PROGRAMMER := avrdude
88
MPU_ARCH := AVR
99

1010
cc_definitions := -DF_CPU=$(clock) \
11-
-DARCH=$(MPU_ARCH) \
12-
-DHW_VER=$(HW_VER)
11+
-DARCH=$(MPU_ARCH)
1312

1413
ifeq ($(DEBUG), 1)
1514
cc_definitions += -DDEBUG

build/ut/toolchain_gcc.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ MPU_ARCH := $(shell echo $(ARCH)|tr 'a-z' 'A-Z')
99

1010
cc_definitions := -DF_CPU=$(clock) \
1111
-DARCH=$(MPU_ARCH) \
12-
-DHW_VER=$(HW_VER) \
1312
-DUNITTESTS
1413

1514
ld_flags :=

include/main.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#pragma once
22

33
#include <stdbool.h>
4-
#include <stdint.h>
5-
#if HW_VER == 1
6-
#include <hw/v1/hwspec.h>
7-
#endif
4+
#include <hw/hwspec.h>
85

96
#if !defined(UNITTESTS)
107
#define NORETURN __attribute__ ((noreturn))

src/fw/irq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <main.h>
22
#include <hal.h>
3-
#if HW_VER == 1
4-
#include <hw/v1/hwspec.h>
5-
#endif
3+
#include <hw/hwspec.h>
64
#include <hw/hwdetect.h>
75

86
void irq_switch_pressed()

src/fw/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include <hal.h>
2-
#if HW_VER == 1
3-
#include <hw/v1/hwspec.h>
4-
#endif
2+
#include <hw/hwspec.h>
53
#include <hw/hwdetect.h>
64
#include <main.h>
75

src/fw/tests.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include <hal.h>
2-
#if HW_VER == 1
3-
#include <hw/v1/hwspec.h>
4-
#endif
2+
#include <hw/hwspec.h>
53
#include <stdint.h>
64
#include <main.h>
75
#include <utils.h>

src/unittests/feature_test.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
#include <mode_mock.h>
66
#include <hal_mock.h>
77
#include <assert.h>
8-
#if HW_VER == 1
9-
#include <hw/v1/hwspec.h>
10-
#endif
8+
#include <hw/hwspec.h>
119

1210
bool mode_is_dirty_after_some_iterations_handler()
1311
{

0 commit comments

Comments
 (0)