Skip to content
Snippets Groups Projects
Commit d55d52db authored by Carlo Alessandro Nicolau's avatar Carlo Alessandro Nicolau
Browse files

Under Development

parent 0e2408fb
No related branches found
No related tags found
No related merge requests found
Showing with 191 additions and 69 deletions
// Auto-generated file: variables.h // Auto-generated file: variables.h
// Generation timestamp: 2021-06-17 18:31:59.933877 // Generation timestamp: 2021-06-20 05:48:56.170376
#ifndef _AUTOGENERATED_VARIABLES_H #ifndef _AUTOGENERATED_VARIABLES_H
#define _AUTOGENERATED_VARIABLES_H #define _AUTOGENERATED_VARIABLES_H
......
...@@ -17,18 +17,33 @@ void _manage_digital_variables(void); ...@@ -17,18 +17,33 @@ void _manage_digital_variables(void);
void _manage_digital_variable(digital_variable_t* _p_variable); void _manage_digital_variable(digital_variable_t* _p_variable);
// "slow" timer interrupt service routine // "slow" timer interrupt service routine
void irq_timer_slow(void) { void irq_timer_slow(void) {
// __TODO LED remove user pin activity
// userpin_SWITCH_LED_D9_set_high();
// update the adcreader state machine // update the adcreader state machine
adcreader_tick_irq(); adcreader_tick_irq();
// update timing register // update timing register
timing_tick_irq(); timing_tick_irq();
// __TODO LED remove user pin activity
// userpin_SWITCH_LED_D9_set_low();
} }
// "fast" timer interrupt service routine // "fast" timer interrupt service routine
void irq_timer_fast(void) { void irq_timer_fast(void) {
// __TODO LED remove user pin activity
// userpin_SWITCH_LED_D10_set_high();
// manage digital alarms // manage digital alarms
_manage_digital_variables(); _manage_digital_variables();
// __TODO LED remove user pin activity
// userpin_SWITCH_LED_D10_set_low();
} }
void _manage_digital_variables(void) { void _manage_digital_variables(void) {
...@@ -38,6 +53,7 @@ void _manage_digital_variables(void) { ...@@ -38,6 +53,7 @@ void _manage_digital_variables(void) {
} }
void _manage_digital_variable(digital_variable_t* _p_variable) { void _manage_digital_variable(digital_variable_t* _p_variable) {
// read digital variables // read digital variables
_p_variable->value = _p_variable->readfunc(); _p_variable->value = _p_variable->readfunc();
...@@ -45,37 +61,41 @@ void _manage_digital_variable(digital_variable_t* _p_variable) { ...@@ -45,37 +61,41 @@ void _manage_digital_variable(digital_variable_t* _p_variable) {
if(_p_variable->value > _p_variable->value_max) { if(_p_variable->value > _p_variable->value_max) {
_p_variable->value_max = _p_variable->value; _p_variable->value_max = _p_variable->value;
} }
// check if timout counter has to be incremented
if(_p_variable->value > 0) { // skip alarm management if alarm not implemented on current variable
// increment counter if(_p_variable->alarm.implement) {
_p_variable->alarm.timeout_counter += 1; // check if timout counter has to be incremented
// avoid wrapping on increment (not very elegant...) if(_p_variable->value > 0) {
if(_p_variable->alarm.timeout_counter == 0) { // increment counter
_p_variable->alarm.timeout_counter -= 1; _p_variable->alarm.timeout_counter += 1;
}
// update alarm counter stats
if(_p_variable->alarm.timeout_counter_max < _p_variable->alarm.timeout_counter) {
_p_variable->alarm.timeout_counter_max = _p_variable->alarm.timeout_counter;
}
}else{
// or reset the counter
_p_variable->alarm.timeout_counter = 0;
}
// check if alarm has fired
if(_p_variable->alarm.enabled) {
// check if timeout was reached
if(_p_variable->alarm.timeout_counter > _p_variable->alarm.timeout) {
// perform the alarm action
_p_variable->alarm.callback();
// increment the fire counter
_p_variable->alarm.firecount += 1;
// avoid wrapping on increment (not very elegant...) // avoid wrapping on increment (not very elegant...)
if(_p_variable->alarm.firecount == 0) { if(_p_variable->alarm.timeout_counter == 0) {
_p_variable->alarm.firecount -= 1; _p_variable->alarm.timeout_counter -= 1;
}
// update alarm counter stats
if(_p_variable->alarm.timeout_counter_max < _p_variable->alarm.timeout_counter) {
_p_variable->alarm.timeout_counter_max = _p_variable->alarm.timeout_counter;
} }
// reset alarm timeout counter }else{
// or reset the counter
_p_variable->alarm.timeout_counter = 0; _p_variable->alarm.timeout_counter = 0;
} }
// check if alarm has fired
if(_p_variable->alarm.enabled) {
// check if timeout was reached
if(_p_variable->alarm.timeout_counter > _p_variable->alarm.timeout) {
// perform the alarm action
_p_variable->alarm.callback();
// increment the fire counter
_p_variable->alarm.firecount += 1;
// avoid wrapping on increment (not very elegant...)
if(_p_variable->alarm.firecount == 0) {
_p_variable->alarm.firecount -= 1;
}
// reset alarm timeout counter
_p_variable->alarm.timeout_counter = 0;
}
}
} }
} }
...@@ -30,8 +30,36 @@ void alarms_enable(void); ...@@ -30,8 +30,36 @@ void alarms_enable(void);
void manage_incoming_data(void); void manage_incoming_data(void);
void _delay_seconds(uint8_t _seconds); void _delay_seconds(uint8_t _seconds);
void main(void) { void main(void) {
return;
// initialize the MCU
init_mcu();
// initialize the communication channel
init_comm();
// initialize the ADC reader
init_adcreader();
// start the interrupt system
start_irqs();
// acquire sensor offsets
sensors_acquire_offsets();
// enable alarms
alarms_enable();
// enter main loop
while(1) {
// manage auto-rescue
rescue_check();
// manage incoming communication data
manage_incoming_data();
}
} }
void init_mcu(void) { void init_mcu(void) {
...@@ -76,17 +104,14 @@ void sensors_acquire_offsets(void) { ...@@ -76,17 +104,14 @@ void sensors_acquire_offsets(void) {
// Note that the ADC is 10 bit, but data are left aligned to 16 bit, we thus // Note that the ADC is 10 bit, but data are left aligned to 16 bit, we thus
// have an headroom of 6 bits = 32 counts. // have an headroom of 6 bits = 32 counts.
// Note also that stored offset values are initialized to zero. // Note also that stored offset values are initialized to zero.
userpin_SWITCH_LED_D10_set_high();
userpin_SWITCH_LED_D9_set_high(); _delay_seconds(5); // wait 5 seconds to make signals steady
_delay_seconds(5); // wait 5 seconds to make signals steady
userpin_SWITCH_LED_D9_set_low();
for(uint8_t k = 0; k < 32; k++) { for(uint8_t k = 0; k < 32; k++) {
__delay_ms(30); // 2.2 * 30 millis are (much) more than sufficient for ADC reader to acquire from all ADC channels __delay_ms(30); // 2.2 * 30 millis are (much) more than sufficient for ADC reader to acquire from all ADC channels
for(uint8_t varidx = 0; varidx < ANALOG_VARIABLES_COUNT; varidx++) { for(uint8_t varidx = 0; varidx < ANALOG_VARIABLES_COUNT; varidx++) {
analog_variables[varidx].offset += analog_variables[varidx].value/32; analog_variables[varidx].offset += analog_variables[varidx].value/32;
} }
} }
userpin_SWITCH_LED_D10_set_low();
} }
void alarms_enable(void) { void alarms_enable(void) {
...@@ -97,12 +122,12 @@ void alarms_enable(void) { ...@@ -97,12 +122,12 @@ void alarms_enable(void) {
void manage_incoming_data(void) { void manage_incoming_data(void) {
// check if a new byte is present in serial port receive buffer // check if a new byte is present in serial port receive buffer
if(serialport_dataready) { if(serialport_dataready) {
// a byte is present, read it and parse it // a byte is present, read it and parse it
communication_parser_appendbyte(serialport_read()); communication_parser_appendbyte(serialport_read());
} }
// check if a complete command was received // check if a complete command was received
if(communication_parser_commandready()) { if(communication_parser_commandready()) {
// a new complete command was received // a new complete command was received
// execute the received command and verify result // execute the received command and verify result
err_t retval = communication_parser_executecommand(); err_t retval = communication_parser_executecommand();
...@@ -112,14 +137,14 @@ void manage_incoming_data(void) { ...@@ -112,14 +137,14 @@ void manage_incoming_data(void) {
// (this function is called after the command was executed to be able to read its value) // (this function is called after the command was executed to be able to read its value)
timing_reset_seconds_since_last_command(); timing_reset_seconds_since_last_command();
// send the response to the host // send the response to the host
// (it was created by the [...]_executecommand function) // (it was created by the [...]_executecommand function)
communication_transmitter_sendresponse(); communication_transmitter_sendresponse();
}else{ }else{
// do nothing // do nothing
error_notify(retval); error_notify(retval);
} }
// reset the parser // reset the parser
communication_parser_reset(); communication_parser_reset();
} }
} }
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
Section: Macro Declarations Section: Macro Declarations
*/ */
#define EUSART1_TX_BUFFER_SIZE 8 #define EUSART1_TX_BUFFER_SIZE 64
#define EUSART1_RX_BUFFER_SIZE 8 #define EUSART1_RX_BUFFER_SIZE 64
/** /**
Section: Global Variables Section: Global Variables
......
...@@ -54,8 +54,8 @@ void SYSTEM_Initialize(void) ...@@ -54,8 +54,8 @@ void SYSTEM_Initialize(void)
PIN_MANAGER_Initialize(); PIN_MANAGER_Initialize();
OSCILLATOR_Initialize(); OSCILLATOR_Initialize();
FVR_Initialize(); FVR_Initialize();
CCP5_Initialize();
ADC_Initialize(); ADC_Initialize();
CCP5_Initialize();
TMR2_Initialize(); TMR2_Initialize();
TMR0_Initialize(); TMR0_Initialize();
EUSART1_Initialize(); EUSART1_Initialize();
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
#include "fvr.h" #include "fvr.h"
#include "ccp5.h" #include "ccp5.h"
#include "tmr2.h" #include "tmr2.h"
#include "tmr0.h"
#include "adc.h" #include "adc.h"
#include "tmr0.h"
#include "eusart1.h" #include "eusart1.h"
......
...@@ -67,7 +67,7 @@ void PIN_MANAGER_Initialize(void) ...@@ -67,7 +67,7 @@ void PIN_MANAGER_Initialize(void)
TRISx registers TRISx registers
*/ */
TRISE = 0x07; TRISE = 0x07;
TRISA = 0x7F; TRISA = 0x3F;
TRISB = 0xFF; TRISB = 0xFF;
TRISC = 0xBF; TRISC = 0xBF;
TRISD = 0x00; TRISD = 0x00;
......
...@@ -71,12 +71,12 @@ void TMR0_Initialize(void) ...@@ -71,12 +71,12 @@ void TMR0_Initialize(void)
// TMR0H 0; // TMR0H 0;
TMR0H = 0x00; TMR0H = 0x00;
// TMR0L 106; // TMR0L 56;
TMR0L = 0x6A; TMR0L = 0x38;
// Load TMR0 value to the 8-bit reload variable // Load TMR0 value to the 8-bit reload variable
timer0ReloadVal = 106; timer0ReloadVal = 56;
// Clear Interrupt flag before enabling the interrupt // Clear Interrupt flag before enabling the interrupt
INTCONbits.TMR0IF = 0; INTCONbits.TMR0IF = 0;
...@@ -87,8 +87,8 @@ void TMR0_Initialize(void) ...@@ -87,8 +87,8 @@ void TMR0_Initialize(void)
// Set Default Interrupt Handler // Set Default Interrupt Handler
TMR0_SetInterruptHandler(TMR0_DefaultInterruptHandler); TMR0_SetInterruptHandler(TMR0_DefaultInterruptHandler);
// T0PS 1:32; T08BIT 8-bit; T0SE Increment_hi_lo; T0CS FOSC/4; TMR0ON enabled; PSA assigned; // T0PS 1:64; T08BIT 8-bit; T0SE Increment_hi_lo; T0CS FOSC/4; TMR0ON enabled; PSA assigned;
T0CON = 0xD4; T0CON = 0xD5;
} }
void TMR0_StartTimer(void) void TMR0_StartTimer(void)
......
...@@ -65,8 +65,8 @@ void TMR2_Initialize(void) ...@@ -65,8 +65,8 @@ void TMR2_Initialize(void)
{ {
// Set TMR2 to the options selected in the User Interface // Set TMR2 to the options selected in the User Interface
// PR2 159; // PR2 199;
PR2 = 0x9F; PR2 = 0xC7;
// TMR2 0; // TMR2 0;
TMR2 = 0x00; TMR2 = 0x00;
...@@ -80,8 +80,8 @@ void TMR2_Initialize(void) ...@@ -80,8 +80,8 @@ void TMR2_Initialize(void)
// Set Default Interrupt Handler // Set Default Interrupt Handler
TMR2_SetInterruptHandler(TMR2_DefaultInterruptHandler); TMR2_SetInterruptHandler(TMR2_DefaultInterruptHandler);
// T2CKPS 1:4; T2OUTPS 1:2; TMR2ON on; // T2CKPS 1:4; T2OUTPS 1:4; TMR2ON on;
T2CON = 0x0D; T2CON = 0x1D;
} }
void TMR2_StartTimer(void) void TMR2_StartTimer(void)
......
...@@ -130,9 +130,9 @@ ...@@ -130,9 +130,9 @@
<targetDevice>PIC18F46K22</targetDevice> <targetDevice>PIC18F46K22</targetDevice>
<targetHeader></targetHeader> <targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard> <targetPluginBoard></targetPluginBoard>
<platformTool></platformTool> <platformTool>noID</platformTool>
<languageToolchain>XC8</languageToolchain> <languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.00</languageToolchainVersion> <languageToolchainVersion>2.20</languageToolchainVersion>
<platform>2</platform> <platform>2</platform>
</toolsSet> </toolsSet>
<packs> <packs>
...@@ -189,9 +189,9 @@ ...@@ -189,9 +189,9 @@
<property key="optimization-level" value="-O0"/> <property key="optimization-level" value="-O0"/>
<property key="optimization-speed" value="false"/> <property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/> <property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/> <property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/> <property key="short-enums" value="true"/>
<property key="tentative-definitions" value=""/>
<property key="undefine-macros" value=""/> <property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/> <property key="use-cci" value="false"/>
<property key="use-iar" value="false"/> <property key="use-iar" value="false"/>
...@@ -247,6 +247,7 @@ ...@@ -247,6 +247,7 @@
</HI-TECH-LINK> </HI-TECH-LINK>
<XC8-CO> <XC8-CO>
<property key="coverage-enable" value=""/> <property key="coverage-enable" value=""/>
<property key="stack-guidance" value="false"/>
</XC8-CO> </XC8-CO>
<XC8-config-global> <XC8-config-global>
<property key="advanced-elf" value="true"/> <property key="advanced-elf" value="true"/>
...@@ -261,6 +262,7 @@ ...@@ -261,6 +262,7 @@
<property key="stack-size-main" value="auto"/> <property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/> <property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/> <property key="user-pack-device-support" value=""/>
<property key="wpo-lto" value="false"/>
</XC8-config-global> </XC8-config-global>
</conf> </conf>
<conf name="ARCA" type="2"> <conf name="ARCA" type="2">
...@@ -269,7 +271,7 @@ ...@@ -269,7 +271,7 @@
<targetDevice>PIC18F46K22</targetDevice> <targetDevice>PIC18F46K22</targetDevice>
<targetHeader></targetHeader> <targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard> <targetPluginBoard></targetPluginBoard>
<platformTool></platformTool> <platformTool>ICD3PlatformTool</platformTool>
<languageToolchain>XC8</languageToolchain> <languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.20</languageToolchainVersion> <languageToolchainVersion>2.20</languageToolchainVersion>
<platform>2</platform> <platform>2</platform>
...@@ -318,7 +320,7 @@ ...@@ -318,7 +320,7 @@
<property key="garbage-collect-functions" value="true"/> <property key="garbage-collect-functions" value="true"/>
<property key="identifier-length" value="255"/> <property key="identifier-length" value="255"/>
<property key="local-generation" value="false"/> <property key="local-generation" value="false"/>
<property key="operation-mode" value="free"/> <property key="operation-mode" value="pro"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/> <property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/> <property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/> <property key="optimization-assembler-files" value="true"/>
...@@ -326,11 +328,11 @@ ...@@ -326,11 +328,11 @@
<property key="optimization-invariant-enable" value="false"/> <property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/> <property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O0"/> <property key="optimization-level" value="-O0"/>
<property key="optimization-speed" value="false"/> <property key="optimization-speed" value="true"/>
<property key="optimization-stable-enable" value="false"/> <property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/> <property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/> <property key="short-enums" value="true"/>
<property key="tentative-definitions" value=""/>
<property key="undefine-macros" value=""/> <property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/> <property key="use-cci" value="false"/>
<property key="use-iar" value="false"/> <property key="use-iar" value="false"/>
...@@ -384,8 +386,87 @@ ...@@ -384,8 +386,87 @@
<property key="program-the-device-with-default-config-words" value="true"/> <property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/> <property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK> </HI-TECH-LINK>
<ICD3PlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="Freeze Peripherals" value="true"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="false"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.configurationmemory2" value="true"/>
<property key="memories.dataflash" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.flashdata" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.instruction.ram" value="true"/>
<property key="memories.instruction.ram.ranges"
value="${memories.instruction.ram.ranges}"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.ranges" value="0-ffff"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.donoteraseauxmem" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preservedataflash.ranges" value=""/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveeeprom.ranges" value="0-3ff"/>
<property key="programoptions.preserveprogram.ranges" value=""/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveuserid" value="false"/>
<property key="programoptions.programcalmem" value="false"/>
<property key="programoptions.programuserotp" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="5.0"/>
</ICD3PlatformTool>
<Tool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="Freeze Peripherals" value="true"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="false"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.configurationmemory2" value="true"/>
<property key="memories.dataflash" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.flashdata" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.instruction.ram" value="true"/>
<property key="memories.instruction.ram.ranges"
value="${memories.instruction.ram.ranges}"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.ranges" value="0-ffff"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.donoteraseauxmem" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preservedataflash.ranges" value=""/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveeeprom.ranges" value="0-3ff"/>
<property key="programoptions.preserveprogram.ranges" value=""/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveuserid" value="false"/>
<property key="programoptions.programcalmem" value="false"/>
<property key="programoptions.programuserotp" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="5.0"/>
</Tool>
<XC8-CO> <XC8-CO>
<property key="coverage-enable" value=""/> <property key="coverage-enable" value=""/>
<property key="stack-guidance" value="false"/>
</XC8-CO> </XC8-CO>
<XC8-config-global> <XC8-config-global>
<property key="advanced-elf" value="true"/> <property key="advanced-elf" value="true"/>
...@@ -400,6 +481,7 @@ ...@@ -400,6 +481,7 @@
<property key="stack-size-main" value="auto"/> <property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/> <property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/> <property key="user-pack-device-support" value=""/>
<property key="wpo-lto" value="false"/>
</XC8-config-global> </XC8-config-global>
</conf> </conf>
</confs> </confs>
......
...@@ -68,12 +68,7 @@ void timing_tick_irq(void) { ...@@ -68,12 +68,7 @@ void timing_tick_irq(void) {
// increment microsecond counter by the number of microseconds per tick // increment microsecond counter by the number of microseconds per tick
_tick_counter_us += IRQ_TIMER_SLOW_PERIOD_US; _tick_counter_us += IRQ_TIMER_SLOW_PERIOD_US;
// check if a second has elapsed // check if a second has elapsed
if(_tick_counter_us >= 1000000) { if(_tick_counter_us >= 1000000) {
// TODO remove user pin activity
if(userpin_SWITCH_LED_D9_get() == PINSTATE_HIGH) userpin_SWITCH_LED_D9_set_low();
else userpin_SWITCH_LED_D9_set_high();
// ONE second elapsed! // ONE second elapsed!
// increment number of seconds since last received command // increment number of seconds since last received command
_timing_seconds_lc += 1; _timing_seconds_lc += 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment