Merge branch 'pressure-wrapper' of github.com:vas-dav/ESP-Ventilation into pressure-wrapper
This commit is contained in:
commit
62ea886575
77
PressureWrapper/Debug/makefile
Normal file
77
PressureWrapper/Debug/makefile
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
-include ../makefile.init
|
||||||
|
|
||||||
|
RM := rm -rf
|
||||||
|
|
||||||
|
# All of the sources participating in the build are defined here
|
||||||
|
-include sources.mk
|
||||||
|
-include src/subdir.mk
|
||||||
|
-include objects.mk
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
ifneq ($(strip $(C++_DEPS)),)
|
||||||
|
-include $(C++_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(CC_DEPS)),)
|
||||||
|
-include $(CC_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(CPP_DEPS)),)
|
||||||
|
-include $(CPP_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(CXX_DEPS)),)
|
||||||
|
-include $(CXX_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(C_DEPS)),)
|
||||||
|
-include $(C_DEPS)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(C_UPPER_DEPS)),)
|
||||||
|
-include $(C_UPPER_DEPS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-include ../makefile.defs
|
||||||
|
|
||||||
|
OPTIONAL_TOOL_DEPS := \
|
||||||
|
$(wildcard ../makefile.defs) \
|
||||||
|
$(wildcard ../makefile.init) \
|
||||||
|
$(wildcard ../makefile.targets) \
|
||||||
|
|
||||||
|
|
||||||
|
BUILD_ARTIFACT_NAME := PressureWrapper
|
||||||
|
BUILD_ARTIFACT_EXTENSION := a
|
||||||
|
BUILD_ARTIFACT_PREFIX := lib
|
||||||
|
BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),)
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
|
||||||
|
# All Target
|
||||||
|
all:
|
||||||
|
+@$(MAKE) --no-print-directory main-build && $(MAKE) --no-print-directory post-build
|
||||||
|
|
||||||
|
# Main-build Target
|
||||||
|
main-build: libPressureWrapper.a
|
||||||
|
|
||||||
|
# Tool invocations
|
||||||
|
libPressureWrapper.a: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS)
|
||||||
|
@echo 'Building target: $@'
|
||||||
|
@echo 'Invoking: MCU Archiver'
|
||||||
|
arm-none-eabi-ar -r "libPressureWrapper.a" $(OBJS) $(USER_OBJS) $(LIBS)
|
||||||
|
@echo 'Finished building target: $@'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
# Other Targets
|
||||||
|
clean:
|
||||||
|
-$(RM) libPressureWrapper.a
|
||||||
|
-@echo ' '
|
||||||
|
|
||||||
|
post-build:
|
||||||
|
-@echo 'Performing post-build steps'
|
||||||
|
-arm-none-eabi-size "libPressureWrapper.a" ; # arm-none-eabi-objdump -h -S "libPressureWrapper.a" >"libPressureWrapper.lss"
|
||||||
|
-@echo ' '
|
||||||
|
|
||||||
|
.PHONY: all clean dependents main-build post-build
|
||||||
|
|
||||||
|
-include ../makefile.targets
|
||||||
8
PressureWrapper/Debug/objects.mk
Normal file
8
PressureWrapper/Debug/objects.mk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
USER_OBJS :=
|
||||||
|
|
||||||
|
LIBS :=
|
||||||
|
|
||||||
28
PressureWrapper/Debug/sources.mk
Normal file
28
PressureWrapper/Debug/sources.mk
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
ASM_SRCS :=
|
||||||
|
C++_SRCS :=
|
||||||
|
CC_SRCS :=
|
||||||
|
CPP_SRCS :=
|
||||||
|
CXX_SRCS :=
|
||||||
|
C_SRCS :=
|
||||||
|
C_UPPER_SRCS :=
|
||||||
|
OBJ_SRCS :=
|
||||||
|
O_SRCS :=
|
||||||
|
S_SRCS :=
|
||||||
|
S_UPPER_SRCS :=
|
||||||
|
ARCHIVES :=
|
||||||
|
C++_DEPS :=
|
||||||
|
CC_DEPS :=
|
||||||
|
CPP_DEPS :=
|
||||||
|
CXX_DEPS :=
|
||||||
|
C_DEPS :=
|
||||||
|
C_UPPER_DEPS :=
|
||||||
|
OBJS :=
|
||||||
|
|
||||||
|
# Every subdirectory with source files must be described here
|
||||||
|
SUBDIRS := \
|
||||||
|
src \
|
||||||
|
|
||||||
3
PressureWrapper/Debug/src/PressureWrapper.su
Normal file
3
PressureWrapper/Debug/src/PressureWrapper.su
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
../src/PressureWrapper.cpp:10:1:PressureWrapper::PressureWrapper() 16 static
|
||||||
|
../src/PressureWrapper.cpp:15:1:PressureWrapper::~PressureWrapper() 16 static
|
||||||
|
../src/PressureWrapper.cpp:15:1:virtual PressureWrapper::~PressureWrapper() 16 static
|
||||||
31
PressureWrapper/Debug/src/subdir.mk
Normal file
31
PressureWrapper/Debug/src/subdir.mk
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
################################################################################
|
||||||
|
# Automatically-generated file. Do not edit!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Add inputs and outputs from these tool invocations to the build variables
|
||||||
|
CPP_SRCS += \
|
||||||
|
../src/PressureWrapper.cpp
|
||||||
|
|
||||||
|
CPP_DEPS += \
|
||||||
|
./src/PressureWrapper.d
|
||||||
|
|
||||||
|
OBJS += \
|
||||||
|
./src/PressureWrapper.o
|
||||||
|
|
||||||
|
|
||||||
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
|
src/%.o: ../src/%.cpp src/subdir.mk
|
||||||
|
@echo 'Building file: $<'
|
||||||
|
@echo 'Invoking: MCU C++ Compiler'
|
||||||
|
arm-none-eabi-c++ -DDEBUG -D__CODE_RED -D__NEWLIB__ -DCORE_M3 -D__USE_LPCOPEN -D__LPC15XX__ -I"/Users/evgenymeshcheryakov/Documents/Metropolia/3rd/Embedded Systems Programming TX00CI61-3011/ESP-Ventilation/PressureWrapper/inc" -I"/Users/evgenymeshcheryakov/Documents/Metropolia/3rd/Embedded Systems Programming TX00CI61-3011/ESP-Ventilation/lpc_board_nxp_lpcxpresso_1549/inc" -I"/Users/evgenymeshcheryakov/Documents/Metropolia/3rd/Embedded Systems Programming TX00CI61-3011/ESP-Ventilation/lpc_chip_15xx/inc" -I"/Users/evgenymeshcheryakov/Documents/Metropolia/3rd/Embedded Systems Programming TX00CI61-3011/ESP-Ventilation/DigitalIoPin/inc" -I"/Users/evgenymeshcheryakov/Documents/Metropolia/3rd/Embedded Systems Programming TX00CI61-3011/ESP-Ventilation/I2C/inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fmerge-constants -fmacro-prefix-map="$(<D)/"= -mcpu=cortex-m3 -mthumb -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||||
|
@echo 'Finished building: $<'
|
||||||
|
@echo ' '
|
||||||
|
|
||||||
|
|
||||||
|
clean: clean-src
|
||||||
|
|
||||||
|
clean-src:
|
||||||
|
-$(RM) ./src/PressureWrapper.d ./src/PressureWrapper.o
|
||||||
|
|
||||||
|
.PHONY: clean-src
|
||||||
|
|
||||||
31
PressureWrapper/inc/PressureWrapper.h
Normal file
31
PressureWrapper/inc/PressureWrapper.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* PressureWrapper.h
|
||||||
|
*
|
||||||
|
* Created on: 5 Oct 2022
|
||||||
|
* Author: evgenymeshcheryakov
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PRESSUREWRAPPER_H_
|
||||||
|
#define PRESSUREWRAPPER_H_
|
||||||
|
|
||||||
|
#include "DigitalIoPin.h"
|
||||||
|
#include "I2C.h"
|
||||||
|
|
||||||
|
#define ADDRESS 0x40
|
||||||
|
#define READADD 0x81
|
||||||
|
#define WRITEADD 0x80
|
||||||
|
|
||||||
|
class PressureWrapper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PressureWrapper();
|
||||||
|
bool getStatus();
|
||||||
|
int16_t getPressure();
|
||||||
|
|
||||||
|
virtual ~PressureWrapper();
|
||||||
|
|
||||||
|
private:
|
||||||
|
I2C *i2c;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* PRESSUREWRAPPER_H_ */
|
||||||
18
PressureWrapper/src/PressureWrapper.cpp
Normal file
18
PressureWrapper/src/PressureWrapper.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* PressureWrapper.cpp
|
||||||
|
*
|
||||||
|
* Created on: 5 Oct 2022
|
||||||
|
* Author: evgenymeshcheryakov
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <PressureWrapper.h>
|
||||||
|
|
||||||
|
PressureWrapper::PressureWrapper()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
PressureWrapper::~PressureWrapper()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated destructor stub
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user