Compare commits
2 Commits
c5b6ba8043
...
5825769356
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5825769356 | ||
|
|
6c93fb80a5 |
@@ -76,6 +76,8 @@ void ioHelperEdgeDetector(void);
|
|||||||
#define LED_PLC_OK BitPH5
|
#define LED_PLC_OK BitPH5
|
||||||
#define LED_BUS_OK BitPD4
|
#define LED_BUS_OK BitPD4
|
||||||
|
|
||||||
|
#define OUT_PUMPE_STARTSTOP BitPB5
|
||||||
|
#define OUT_PUMPE_PWM BitPB6
|
||||||
|
|
||||||
//Inputs
|
//Inputs
|
||||||
//Verknüpfen von Pin | Bit mit Bitposition (0...n) inStates[0...n/8].
|
//Verknüpfen von Pin | Bit mit Bitposition (0...n) inStates[0...n/8].
|
||||||
|
|||||||
8
main.c
8
main.c
@@ -16,6 +16,8 @@
|
|||||||
#include "spi.h"
|
#include "spi.h"
|
||||||
#include "mqtt.h"
|
#include "mqtt.h"
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
|
#include "modbus-master.h"
|
||||||
|
#include "gefran_gtf.h"
|
||||||
|
|
||||||
#include "util/delay.h"
|
#include "util/delay.h"
|
||||||
|
|
||||||
@@ -159,6 +161,9 @@ int main()
|
|||||||
|
|
||||||
ioHelperSetBit(outStatesBlinking, LED_PLC_OK, 1);
|
ioHelperSetBit(outStatesBlinking, LED_PLC_OK, 1);
|
||||||
|
|
||||||
|
ioHelperSetBit(outStates, OUT_PUMPE_STARTSTOP, 1);
|
||||||
|
ioHelperSetBit(outStates, OUT_PUMPE_PWM, 1);
|
||||||
|
|
||||||
uint32_t timer_blink_outs = millis();
|
uint32_t timer_blink_outs = millis();
|
||||||
uint32_t timer_send_uptime = millis();
|
uint32_t timer_send_uptime = millis();
|
||||||
|
|
||||||
@@ -180,6 +185,7 @@ int main()
|
|||||||
send_values();
|
send_values();
|
||||||
#endif
|
#endif
|
||||||
timer_blink_outs = millis();
|
timer_blink_outs = millis();
|
||||||
|
printf("gefran: 0x%02X\n", gtf_firmware_version(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PLC_MQTT_ENABLED
|
#if PLC_MQTT_ENABLED
|
||||||
@@ -236,6 +242,8 @@ static void avr_init(void)
|
|||||||
uart_init();
|
uart_init();
|
||||||
initADC();
|
initADC();
|
||||||
|
|
||||||
|
modbus_master_init();
|
||||||
|
|
||||||
sei(); //re-enable global interrupts
|
sei(); //re-enable global interrupts
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user