Code: Select all
#include "ZUNO_DS18B20.h"
#define FAN1_PWM_PIN 13
#define FAN1_ENABLE_PIN 26
s_pin FAN1_TACH_PIN = 9;
#define FAN2_PWM_PIN 22
#define FAN2_ENABLE_PIN 27
s_pin FAN2_TACH_PIN = 10;
#define MOSFET1_PWM_PIN 20
#define ONE_WIRE1_PIN 11
#define ONE_WIRE2_PIN 12
ZUNO_SETUP_CHANNELS(
ZUNO_SWITCH_MULTILEVEL(fan1pwmgetter, fan1pwmsetter),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, temp1getter)
);
void setup() {
}
void loop() {
}
word temp1getter() {
// NoOp
}
// Fan 1
word fan1tachgetter() {
// NoOp
}
word fan1pwmgetter() {
// NoOp
}
word fan1pwmsetter() {
// NoOp
}
But adding ONE line with a rotation sensor, it does not compile.
Code: Select all
#include "ZUNO_DS18B20.h"
#define FAN1_PWM_PIN 13
#define FAN1_ENABLE_PIN 26
s_pin FAN1_TACH_PIN = 9;
#define FAN2_PWM_PIN 22
#define FAN2_ENABLE_PIN 27
s_pin FAN2_TACH_PIN = 10;
#define MOSFET1_PWM_PIN 20
#define ONE_WIRE1_PIN 11
#define ONE_WIRE2_PIN 12
ZUNO_SETUP_CHANNELS(
ZUNO_SWITCH_MULTILEVEL(fan1pwmgetter, fan1pwmsetter),
ZUNO_SENSOR_MULTILEVEL_TYPE_ROTATION(fan1tachgetter),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, temp1getter)
);
void setup() {
}
void loop() {
}
word temp1getter() {
// NoOp
}
word fan1tachgetter() {
// NoOp
}
word fan1pwmgetter() {
// NoOp
}
word fan1pwmsetter() {
// NoOp
}
C:\Users\j2\AppData\Roaming\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.30/zuno_toolchain/compiler build C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp/TVBankController.cpp -r C:\Users\j2\AppData\Roaming\Arduino15\packages\Z-Uno\hardware\zw8051\2.0.8
************* Building Arduino Sketch *************
C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp/TVBankController.cpp
***************************************************
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Print.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Print_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Stream.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Stream_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HardwareSerial.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HardwareSerial_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HLCore.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HLCore_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_OneWire.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_OneWire_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_DS18B20.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_DS18B20_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\_TVBankController.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\_TVBankController_sdcpp_.cpp ...
TVBankController.ino:34:1control reaches end of non-void function
TVBankController.ino:38:1control reaches end of non-void function
TVBankController.ino:41:1control reaches end of non-void function
TVBankController.ino:44:1control reaches end of non-void function
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Print.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Print_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Stream.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\Stream_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HardwareSerial.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HardwareSerial_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HLCore.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\HLCore_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_OneWire.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_OneWire_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_DS18B20.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\ZUNO_DS18B20_sdcpp_.cpp ...
Preprocessing file: C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\_TVBankController.cpp with SDCPP...
Compiling C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\_TVBankController_sdcpp_.cpp ...
TVBankController.ino:34:1control reaches end of non-void function
TVBankController.ino:38:1control reaches end of non-void function
TVBankController.ino:41:1control reaches end of non-void function
TVBankController.ino:44:1control reaches end of non-void functionCompiling file "C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\LLCore_arduino.c" by means of SDCC...
sdcc: Calling preprocessor...
sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\j2\AppData\Roaming\ARDUIN~1\packages\Z-Uno\tools\ZUNO_T~1\0008~1.30\ZUNO_T~1/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\j2\AppData\Roaming\ARDUIN~1\packages\Z-Uno\tools\ZUNO_T~1\0008~1.30\ZUNO_T~1/sdcc/\bin\..\include" "C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\LLCore_arduino.c"
sdcc: Generating code...
C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\LLCore_arduino.c:44: warning 85: in function NOPS unreferenced function argument : 'i'
C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\LLCore_arduino.c:256: warning 85: in function delayLoops unreferenced function argument : 'v'
C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\/Custom.h:23: error 12: called object is not a function
C:\Users\j2\AppData\Local\Temp\build8887622240629786535.tmp\/Custom.h:23: error 69: struct/union/array 'zunoChannelSetupArray': initialization needs curly braces
Error. SDCC returned: 1
Error compiling.