Skip to content

Commit

Permalink
Print transmitted bytes for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
masonticehurst committed Mar 9, 2024
1 parent 93cae0e commit 3feb9da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions eRINA_STM32F7/src/net/stm32/net-interfaces-stm32.adb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ with STM32_SVD.Ethernet;
with HAL;
with Cortex_M.Cache;
with Debug;
with Net.Buffers; use Net.Buffers;
with Buffers; use Buffers;

package body Net.Interfaces.STM32 is

Expand Down Expand Up @@ -144,6 +146,18 @@ package body Net.Interfaces.STM32 is
(Debug.Info,
"Ethernet frame transmitted with" & Buf.Get_Length'Image &
" Bytes");

declare
Buf_Raw :
Byte_Buffer
(1 .. Integer (Buf.Get_Data_Size (Net.Buffers.RAW_PACKET))) with
Address =>
Buf.Get_Data_Address
(Net.Buffers.Offsets (Net.Buffers.RAW_PACKET));
begin
Debug.Print (Debug.Info, Buffer_To_Byte_String (Buf_Raw));
end;

Transmit_Queue.Send (Buf);
exception
when E : others =>
Expand Down

0 comments on commit 3feb9da

Please sign in to comment.