Skip to content

Commit

Permalink
Merge pull request RIOT-OS#9317 from maribu/sht1x
Browse files Browse the repository at this point in the history
drivers/sht11: Major refactoring
  • Loading branch information
aabadie authored Jun 27, 2018
2 parents f4c0149 + 8e20067 commit 6e6716a
Show file tree
Hide file tree
Showing 36 changed files with 1,996 additions and 708 deletions.
2 changes: 0 additions & 2 deletions boards/common/msb-430/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
MODULE = boards_common_msb-430

DIRS = drivers

include $(RIOTBASE)/Makefile.base
3 changes: 0 additions & 3 deletions boards/common/msb-430/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ export DEBUGGER_FLAGS = --tui --ex="target remote localhost:2000" --ex "monitor

# export common msb-430 includes
export INCLUDES += -I$(RIOTBOARD)/common/msb-430/include
export INCLUDES += -I$(RIOTBOARD)/common/msb-430/drivers/include

USEMODULE += boards_common_msb-430-drivers
5 changes: 0 additions & 5 deletions boards/common/msb-430/drivers/Makefile

This file was deleted.

49 changes: 0 additions & 49 deletions boards/common/msb-430/drivers/include/sht11-board.h

This file was deleted.

2 changes: 0 additions & 2 deletions boards/common/msba2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
MODULE = boards_common_msba2

DIRS = drivers

include $(RIOTBASE)/Makefile.base
3 changes: 0 additions & 3 deletions boards/common/msba2/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@ endif
export FFLAGS = $(PORT) $(HEXFILE)

INCLUDES += -I$(RIOTBOARD)/common/msba2/include
INCLUDES += -I$(RIOTBOARD)/common/msba2/drivers/include

export UNDEF += $(BINDIR)/cpu/startup.o

USEMODULE += boards_common_msba2-drivers
3 changes: 0 additions & 3 deletions boards/common/msba2/drivers/Makefile

This file was deleted.

56 changes: 0 additions & 56 deletions boards/common/msba2/drivers/include/sht11-board.h

This file was deleted.

3 changes: 3 additions & 0 deletions boards/msb-430/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += sht11
endif
8 changes: 8 additions & 0 deletions boards/msb-430/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ extern "C" {
#define MSP430_HAS_EXTERNAL_CRYSTAL 0
/** @} */

/**
* @name Configure on-board SHT11 device
* @{
*/
#define SHT1X_PARAM_CLK (GPIO_PIN(3, 5))
#define SHT1X_PARAM_DATA (GPIO_PIN(3, 4))
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions boards/msb-430h/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += sht11
endif
8 changes: 8 additions & 0 deletions boards/msb-430h/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ extern "C" {
#define MSP430_HAS_EXTERNAL_CRYSTAL 1
/** @} */

/**
* @name Configure on-board SHT11 device
* @{
*/
#define SHT1X_PARAM_CLK (GPIO_PIN(3, 5))
#define SHT1X_PARAM_DATA (GPIO_PIN(3, 4))
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions boards/msba2/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ include $(RIOTBOARD)/common/msba2/Makefile.dep
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
USEMODULE += cc110x
endif

ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += sht11
endif
4 changes: 3 additions & 1 deletion drivers/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ ifneq (,$(filter servo,$(USEMODULE)))
FEATURES_REQUIRED += periph_pwm
endif

ifneq (,$(filter sht11,$(USEMODULE)))
ifneq (,$(filter sht1%,$(USEMODULE)))
USEMODULE += sht1x
FEATURES_REQUIRED += periph_gpio
USEMODULE += xtimer
endif

Expand Down
4 changes: 4 additions & 0 deletions drivers/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ ifneq (,$(filter dht,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/drivers/dht/include
endif

ifneq (,$(filter sht1x,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/drivers/sht1x/include
endif

ifneq (,$(filter ds1307,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/drivers/ds1307/include
endif
Expand Down
108 changes: 0 additions & 108 deletions drivers/include/sht11.h

This file was deleted.

Loading

0 comments on commit 6e6716a

Please sign in to comment.