text stringlengths 0 234 |
|---|
loop |
Read (This, REG_RESULT_INTERRUPT_STATUS, Val, Status); |
exit when not Status; |
exit when (Val and 16#07#) /= 0; |
end loop; |
if not Status then |
return; |
end if; |
Write (This, REG_SYSTEM_INTERRUPT_CLEAR, UInt8'(16#01#), Status); |
if not Status then |
return; |
end if; |
Write (This, REG_SYSRANGE_START, UInt8'(16#00#), Status); |
end Perform_Single_Ref_Calibration; |
----------------------------- |
-- Perform_Ref_Calibration -- |
----------------------------- |
procedure Perform_Ref_Calibration |
(This : in out VL53L0X_Ranging_Sensor; |
Status : out Boolean) |
is |
begin |
-- VHV calibration |
Write (This, REG_SYSTEM_SEQUENCE_CONFIG, UInt8'(16#01#), Status); |
if Status then |
Perform_Single_Ref_Calibration (This, 16#40#, Status); |
end if; |
-- Phase calibration |
if Status then |
Write (This, REG_SYSTEM_SEQUENCE_CONFIG, UInt8'(16#02#), Status); |
end if; |
if Status then |
Perform_Single_Ref_Calibration (This, 16#00#, Status); |
end if; |
-- Restore the sequence config |
if Status then |
Write (This, REG_SYSTEM_SEQUENCE_CONFIG, UInt8'(16#E8#), Status); |
end if; |
end Perform_Ref_Calibration; |
------------------------------------ |
-- Start_Range_Single_Millimeters -- |
------------------------------------ |
procedure Start_Range_Single_Millimeters |
(This : VL53L0X_Ranging_Sensor; |
Status : out Boolean) |
is |
Val : UInt8; |
begin |
Write (This, 16#80#, UInt8'(16#01#), Status); |
if Status then |
Write (This, 16#FF#, UInt8'(16#01#), Status); |
end if; |
if Status then |
Write (This, 16#00#, UInt8'(16#00#), Status); |
end if; |
if Status then |
Write (This, 16#91#, This.Stop_Variable, Status); |
end if; |
if Status then |
Write (This, 16#00#, UInt8'(16#01#), Status); |
end if; |
if Status then |
Write (This, 16#FF#, UInt8'(16#00#), Status); |
end if; |
if Status then |
Write (This, 16#80#, UInt8'(16#00#), Status); |
end if; |
if Status then |
Write (This, REG_SYSRANGE_START, UInt8'(16#01#), Status); |
end if; |
if not Status then |
return; |
end if; |
loop |
Read (This, REG_SYSRANGE_START, Val, Status); |
exit when not Status; |
exit when (Val and 16#01#) = 0; |
end loop; |
end Start_Range_Single_Millimeters; |
--------------------------- |
-- Range_Value_Available -- |
--------------------------- |
function Range_Value_Available |
(This : VL53L0X_Ranging_Sensor) return Boolean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.