Commit 27e6a392 authored by Maxime Perrotin's avatar Maxime Perrotin

Fix Demo_UART

parent 7f9c3881
......@@ -26,10 +26,12 @@ test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
cp og_ri.ada og_ri.adb
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal *.asn
cp ris.ada ris.ads && cp check.ada check.adb && cp ris_adb.ada ris.adb
gnat make -g -O0 check && ./check | diff expected -
gnat make -g -O0 check
./check | diff expected -
test-c:
$(OPENGEODE) og.pr --toC
......
with Text_IO; use Text_IO;
package body og_RI is
procedure send_to_uart (send_to_uart_param : in out asn1SccOctStr) is
begin
Put_Line ("Received " & Send_To_UART_Param.Length'Img);
end;
end og_RI;
with TASTE_DataView;
use TASTE_DataView;
package ris is
procedure Send_To_UART (Msg: access Taste_dataview.asn1SccOctStr);
pragma Export (C, Send_To_UART, "og_RI_send_to_uart");
procedure Check_Queue (Result: access Boolean);
procedure Check_Queue (Result: out Boolean);
pragma Export (C, Check_Queue, "og_check_queue");
end ris;
with Text_IO; use Text_IO;
package body RIs is
procedure Check_Queue (Result: access Boolean) is
procedure Check_Queue (Result: out Boolean) is
begin
Put_Line ("Checking queue");
Result.all := False;
Result := False;
end Check_Queue;
procedure Send_To_UART (Msg: access Taste_dataview.asn1SccOctStr) is
begin
Put_Line ("Received " & Msg.Length'Img);
end;
end RIs;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment