Add pump code to Makefile

This commit is contained in:
2025-05-16 09:22:20 +02:00
parent 09fed73696
commit 64852b2a67
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ RM = rm -f
BUILD_DIR = build
OBJ_DIR = $(BUILD_DIR)/obj
SRCS_C = source/adc.c source/moisture.c source/main.c
SRCS_C = source/adc.c source/moisture.c source/main.c source/pump.c
OBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(SRCS_C:.c=.o)))
+1 -1
View File
@@ -5,5 +5,5 @@
#include "config.h"
void pumpsInit(void);
void pumpsTrigger(uint8_t digital_pins, int16_t milliseconds);
void triggerPump(uint8_t digital_pins, int16_t milliseconds);
void waterPlant(void);
+2 -2
View File
@@ -10,7 +10,7 @@ void pumpsInit(void) {
(1 << PUMP_D5) |
(1 << PUMP_D4) |
(1 << PUMP_D3) |
0 | 0 | 0 ));
0 | 0 | 0 );
}
void triggerPump(int8_t pump_pin, int16_t milliseconds) {
@@ -21,7 +21,7 @@ void triggerPump(int8_t pump_pin, int16_t milliseconds) {
// NOTE: watchout for overflows!! create a safety net.
// Turn off pump
PORTD &= ~(1 << pump_pin);
//PORTD &= ~(1 << pump_pin);
}
void waterPlant(void) {