mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +02:00
* Xtensa FreeRTOS: unified haltproc
git-svn-id: trunk@46679 -
This commit is contained in:
parent
03a0e6e82f
commit
c73c98d995
@ -75,11 +75,16 @@ unit esp32;
|
||||
|
||||
procedure _FPC_haltproc; public name '_haltproc';noreturn;
|
||||
begin
|
||||
printpchar('_haltproc called, going to deep sleep, exit code: $');
|
||||
printdword(operatingsystem_result);
|
||||
printpchar(#10);
|
||||
while true do
|
||||
esp_deep_sleep_start;
|
||||
if operatingsystem_result <> 0 then
|
||||
writeln('Runtime error ', operatingsystem_result);
|
||||
|
||||
writeln('_haltproc called, exit code: ',operatingsystem_result);
|
||||
flushOutput(TextRec(Output));
|
||||
repeat
|
||||
// Allow other tasks to run
|
||||
// Do not enter deep sleep, can lead to problems with flashing
|
||||
vTaskDelay(1000);
|
||||
until false;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ unit esp8266;
|
||||
if operatingsystem_result <> 0 then
|
||||
writeln('Runtime error ', operatingsystem_result);
|
||||
|
||||
writeln('_haltproc called...');
|
||||
writeln('_haltproc called, exit code: ',operatingsystem_result);
|
||||
flushOutput(TextRec(Output));
|
||||
repeat
|
||||
// Allow other tasks to run
|
||||
|
Loading…
Reference in New Issue
Block a user