Skip to content

Commit

Permalink
Added ADVANCED_OK support + #2761 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
digant73 committed Aug 20, 2023
1 parent 8a08dce commit 6f9908b
Show file tree
Hide file tree
Showing 44 changed files with 176 additions and 77 deletions.
22 changes: 21 additions & 1 deletion Copy to SD Card root directory to update/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
# SET_PROGRESS_MANUALLY (in Configuration_adv.h)
# M73_REPORT (in Configuration_adv.h)
#
# Options to support ADVANCED_OK with host:
# ADVANCED_OK (in Configuration_adv.h)
#
# Options to support M600 with host & (Un)Load menu:
# Options to support dialog with host (as pre requisite)
# NOZZLE_PARK_FEATURE (in Configuration.h)
Expand Down Expand Up @@ -107,6 +110,23 @@
# Options: [OFF (port disabled): 0, 2400: 1, 9600: 2, 19200: 3, 38400: 4, 57600: 5, 115200: 6, 250000: 7, 500000: 8, 1000000: 9]
serial_port:P1:6 P2:0 P3:0 P4:0

#### Advanced OK
# Used/effective only in case "ADVANCED_OK" is also enabled in Configuration_adv.h in Marlin firmware.
# If enabled, the TFT will support the ADVANCED_OK feature eventually enabled in Marlin firmware.
# It means that the TFT will use the available TX G-code slots indication provided by the mainboard
# to schedule the transmission of multiple G-codes, if any, for a maximum of the given indication.
# If disabled, the TFT will support, independenly from the ADVANCED_OK feature configured in Marlin
# firmware, the transmission of a single G-code per time waiting for the related ACK message from
# the mainboard before proceeding with the next G-code transmission, if any.
#
# NOTES:
# - Enable it in case ADVANCED_OK feature is enabled in Marlin firmware.
# - Disable it (preferably) in case ADVANCED_OK feature is disabled in Marlin firmware or
# if ADVANCED_OK feature is not requested/needed by the user.
#
# Options: [disable: 0, enable: 1]
advanced_ok:0

#### Emulated M600
# The TFT intercepts the M600 G-code (filament change) and emulates the handling logic
# otherwise provided by Marlin firmware.
Expand Down Expand Up @@ -647,7 +667,7 @@ probing_z_raise:20.0
#### Z Steppers Auto-Alignment (ABL)
# It allows to align multiple Z stepper motors using a bed probe by probing one position per stepper.
# Enable this setting to show an icon in ABL menu allowing to run G34 command (it requires
# Z_STEPPER_AUTO_ALIGN enabled in Configuration_adv.h in Marlin firmware).
# "Z_STEPPER_AUTO_ALIGN" enabled in Configuration_adv.h in Marlin firmware).
#
# NOTE: Only for Marlin printers with one stepper driver per Z stepper motor and no Z timing belt.
#
Expand Down
19 changes: 18 additions & 1 deletion Copy to SD Card root directory to update/config_rrf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@
# Options: [OFF (port disabled): 0, 2400: 1, 9600: 2, 19200: 3, 38400: 4, 57600: 5, 115200: 6, 250000: 7, 500000: 8, 1000000: 9]
serial_port:P1:5 P2:0 P3:0 P4:0

#### Advanced OK
# Used/effective only in case "ADVANCED_OK" is also enabled in Configuration_adv.h in Marlin firmware.
# If enabled, the TFT will support the ADVANCED_OK feature eventually enabled in Marlin firmware.
# It means that the TFT will use the available TX G-code slots indication provided by the mainboard
# to schedule the transmission of multiple G-codes, if any, for a maximum of the given indication.
# If disabled, the TFT will support, independenly from the ADVANCED_OK feature configured in Marlin
# firmware, the transmission of a single G-code per time waiting for the related ACK message from
# the mainboard before proceeding with the next G-code transmission, if any.
#
# NOTES:
# - Enable it in case ADVANCED_OK feature is enabled in Marlin firmware.
# - Disable it (preferably) in case ADVANCED_OK feature is disabled in Marlin firmware or
# if ADVANCED_OK feature is not requested/needed by the user.
#
# Options: [disable: 0, enable: 1]
advanced_ok:0

#### Emulated M600
# The TFT intercepts the M600 G-code (filament change) and emulates the handling logic
# otherwise provided by Marlin firmware.
Expand Down Expand Up @@ -613,7 +630,7 @@ probing_z_raise:20.0
#### Z Steppers Auto-Alignment (ABL)
# It allows to align multiple Z stepper motors using a bed probe by probing one position per stepper.
# Enable this setting to show an icon in ABL menu allowing to run G34 command (it requires
# Z_STEPPER_AUTO_ALIGN enabled in Configuration_adv.h in Marlin firmware).
# "Z_STEPPER_AUTO_ALIGN" enabled in Configuration_adv.h in Marlin firmware).
#
# NOTE: Only for Marlin printers with one stepper driver per Z stepper motor and no Z timing belt.
#
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ the following options must be enabled in Marlin firmware.
`SET_PROGRESS_MANUALLY` (in Configuration_adv.h)<br>
`M73_REPORT` (in Configuration_adv.h)<br>

**Options to support ADVANCED_OK with host:**

`ADVANCED_OK` (in Configuration_adv.h)<br>

**Options to support M600 with host & (Un)Load menu:**

`Options to support dialog with host` (as pre requisite)<br>
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/Language.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

// config.ini Parameter Settings - Screen Settings and Feature Settings
X_WORD (LANGUAGE)
X_WORD (ADVANCED_OK)
X_WORD (EMULATED_M600)
X_WORD (EMULATED_M109_M190)
X_WORD (EVENT_LED)
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_am.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Հայերեն"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_br.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Português BRASIL"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "M600 emulado"
#define STRING_EMULATED_M109_M190 "M109 / M190 emulado"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_ca.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Català"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "简体中文"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "模拟M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Čeština"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulace M600"
#define STRING_EMULATED_M109_M190 "Emulace M109 / M190"
#define STRING_EVENT_LED "LED události"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_de.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Deutsch"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emuliere M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "English"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_es.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Español"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Français"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emuler M600"
#define STRING_EMULATED_M109_M190 "Emuler M109 / M190"
#define STRING_EVENT_LED "LED Neopixel"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Ελληνικά"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_hr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Hrvatski"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emuliraj M600"
#define STRING_EMULATED_M109_M190 "Emuliraj M109 / M190"
#define STRING_EVENT_LED "LED event"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_hu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Magyar"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulált M600"
#define STRING_EMULATED_M109_M190 "Emulált M109 / M190"
#define STRING_EVENT_LED "Esemény LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Italiano"
#define STRING_ADVANCED_OK "OK avanzato"
#define STRING_EMULATED_M600 "M600 emulato"
#define STRING_EMULATED_M109_M190 "M109 / M190 emulati"
#define STRING_EVENT_LED "LED evento"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_jp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "日本語"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extern "C" {

// config.ini Parameter Settings - Screen Settings and Feature Settings
#define LANG_KEY_LANGUAGE "label_language:"
#define LANG_KEY_ADVANCED_OK "label_advanced_ok:"
#define LANG_KEY_EMULATED_M600 "label_emulated_m600:"
#define LANG_KEY_EMULATED_M109_M190 "label_emulated_m109_m190:"
#define LANG_KEY_EVENT_LED "label_event_led:"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Dutch"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_pl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Polski"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulowane M600"
#define STRING_EMULATED_M109_M190 "Emulowane M109 / M190"
#define STRING_EVENT_LED "Sygn. zdarzenia diodą LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Portugues"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_ru.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Русский"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Эмуляция M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_sk.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Slovensky"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_sl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Slovenski"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_tc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "正體中文"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_tr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Türkçe"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/Language/language_uk.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config.ini Parameter Settings - Screen Settings and Feature Settings
#define STRING_LANGUAGE "Українська"
#define STRING_ADVANCED_OK "Advanced OK"
#define STRING_EMULATED_M600 "Emulated M600"
#define STRING_EMULATED_M109_M190 "Emulated M109 / M190"
#define STRING_EVENT_LED "Event LED"
Expand Down
2 changes: 1 addition & 1 deletion TFT/src/User/API/Printing.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void loopBreakToCondition(CONDITION_CALLBACK condCallback)
// from that command. Than another "M108" will be sent to unlock a next possible blocking command.
// This way enough "M108" will be sent to unlock all possible blocking command(s) (ongoing or enqueued) but not too much and
// not too fast one after another to overload/overrun the serial communication
TASK_LOOP_WHILE(condCallback(), if (infoHost.rx_ok[SERIAL_PORT] == true) sendEmergencyCmd("M108\n"))
TASK_LOOP_WHILE(condCallback(), if (Serial_Available(SERIAL_PORT) != 0) sendEmergencyCmd("M108\n"));

// remove any enqueued command that could come from a supplementary serial port or TFT media
// (if printing from remote host or TFT media) during the loop above
Expand Down
44 changes: 20 additions & 24 deletions TFT/src/User/API/SerialConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ const char * const baudrateNames[BAUDRATE_COUNT] = {"OFF", "2400", "9600", "1920

static inline void Serial_InitPrimary(void)
{
infoHost.connected = infoHost.wait = false;
infoHost.status = HOST_STATUS_IDLE;
setReminderMsg(LABEL_UNCONNECTED, SYS_STATUS_DISCONNECTED);

infoHost.tx_slots = DEFAULT_TX_SLOTS;
infoHost.wait = infoHost.connected = false;
infoHost.status = HOST_STATUS_IDLE;

Serial_Config(serialPort[PORT_1].port, serialPort[PORT_1].cacheSize, baudrateValues[infoSettings.serial_port[PORT_1]]);
}

Expand Down Expand Up @@ -112,7 +114,7 @@ void Serial_Forward(SERIAL_PORT_INDEX portIndex, const char * msg)
Serial_Put(SERIAL_DEBUG_PORT, msg);
#endif

uint8_t portCount = SERIAL_PORT_COUNT; // by default, select all the serial ports
uint8_t portCount = SERIAL_PORT_COUNT; // by default, select all the serial ports

if (portIndex == ALL_PORTS) // if ALL_PORTS, forward the message to all the enabled serial ports
portIndex = PORT_1;
Expand All @@ -136,25 +138,34 @@ void Serial_Forward(SERIAL_PORT_INDEX portIndex, const char * msg)
}
}

uint16_t Serial_Available(SERIAL_PORT_INDEX portIndex)
{
if (!WITHIN(portIndex, PORT_1, SERIAL_PORT_COUNT - 1))
return 0;

return (dmaL1Data[portIndex].cacheSize + dmaL1Data[portIndex].wIndex - dmaL1Data[portIndex].rIndex) % dmaL1Data[portIndex].cacheSize;
}

uint16_t Serial_Get(SERIAL_PORT_INDEX portIndex, char * buf, uint16_t bufSize)
{
// if port index is out of range or no data to read from L1 cache
if (!WITHIN(portIndex, PORT_1, SERIAL_PORT_COUNT - 1) || !infoHost.rx_ok[portIndex])
if (!WITHIN(portIndex, PORT_1, SERIAL_PORT_COUNT - 1) || dmaL1Data[portIndex].rIndex == dmaL1Data[portIndex].wIndex)
return 0;

// make access to dinamically changed (by L1 cache's interrupt handler) variables/attributes faster and also reducing the code
DMA_CIRCULAR_BUFFER * dmaL1Data_ptr = &dmaL1Data[portIndex];
uint16_t * wIndex_ptr = &dmaL1Data_ptr->wIndex;

// L1 cache's reading index (not dinamically changed (by L1 cache's interrupt handler) variables/attributes)
// make a static access to dynamically changed (by L1 cache's interrupt handler) variables/attributes
uint16_t wIndex = dmaL1Data_ptr->wIndex;

// L1 cache's reading index (not dynamically changed (by L1 cache's interrupt handler) variables/attributes)
uint16_t rIndex = dmaL1Data_ptr->rIndex;

while (dmaL1Data_ptr->cache[rIndex] == ' ' && rIndex != *wIndex_ptr) // remove leading empty space, if any
while (dmaL1Data_ptr->cache[rIndex] == ' ' && rIndex != wIndex) // remove leading empty space, if any
{
rIndex = (rIndex + 1) % dmaL1Data_ptr->cacheSize;
}

for (uint16_t i = 0; i < (bufSize - 1) && rIndex != *wIndex_ptr; ) // retrieve data until buf is full or L1 cache is empty
for (uint16_t i = 0; i < (bufSize - 1) && rIndex != wIndex; ) // retrieve data until buf is full or L1 cache is empty
{
buf[i] = dmaL1Data_ptr->cache[rIndex];
rIndex = (rIndex + 1) % dmaL1Data_ptr->cacheSize;
Expand All @@ -164,27 +175,12 @@ uint16_t Serial_Get(SERIAL_PORT_INDEX portIndex, char * buf, uint16_t bufSize)
buf[i] = '\0'; // end character
dmaL1Data_ptr->rIndex = rIndex; // update queue's index

if (rIndex == dmaL1Data_ptr->wIndex) // if L1 cache is empty, mark the port as containing no more data
infoHost.rx_ok[portIndex] = false;

return i; // return the number of bytes stored in buf
}
}

// if here, a partial message is present on the L1 cache (message not terminated by "\n").
// We temporary skip the message until it is fully received
//
// NOTES:
// - this scenario typically happens when the TFT receives a burst of messages (e.g. the output for "M420 V1 T1").
// The first fully received message (terminated by "\n") is enough to trigger the L1 cache as available
// (infoHost.rx_ok[portIndex] set to "true") for reading
// - it is more safe to leave the following code line commented out just to avoid any possibility the
// L1 cache's interrupt handler is receiving (and triggering L1 cache as available) in the meanwhile
// (more safe to perform an active polling on the next invokation of this function than the possibility
// to not be able to read the message (if infoHost.rx_ok[portIndex] is found set to "false") until a
// next message (if any) becomes available)
//
// infoHost.rx_ok[portIndex] = false; // mark the port as containing no more (or partial) data

return 0; // return the number of bytes stored in buf
}
Expand Down
Loading

0 comments on commit 6f9908b

Please sign in to comment.