text
stringlengths 0
234
|
|---|
Tmp := (Tmp and 16#EF#) or Data;
|
Write (This, REG_GPIO_HV_MUX_ACTIVE_HIGH, Tmp, Status);
|
end if;
|
if Status then
|
Clear_Interrupt_Mask (This);
|
end if;
|
end Set_GPIO_Config;
|
--------------------------
|
-- Clear_Interrupt_Mask --
|
--------------------------
|
procedure Clear_Interrupt_Mask
|
(This : VL53L0X_Ranging_Sensor)
|
is
|
Status : Boolean with Unreferenced;
|
-- Tmp : UInt8;
|
begin
|
-- for J in 1 .. 3 loop
|
Write (This, REG_SYSTEM_INTERRUPT_CLEAR, UInt8'(16#01#), Status);
|
-- exit when not Status;
|
-- Write (This, REG_SYSTEM_INTERRUPT_CLEAR, UInt8'(16#00#), Status);
|
-- exit when not Status;
|
-- Read (This, REG_RESULT_INTERRUPT_STATUS, Tmp, Status);
|
-- exit when not Status;
|
-- exit when (Tmp and 16#07#) /= 0;
|
-- end loop;
|
end Clear_Interrupt_Mask;
|
---------------------------
|
-- Sequence_Step_Enabled --
|
---------------------------
|
function Sequence_Step_Enabled
|
(This : VL53L0X_Ranging_Sensor) return VL53L0x_Sequence_Step_Enabled
|
is
|
Sequence_Steps : VL53L0x_Sequence_Step_Enabled;
|
Sequence_Config : UInt8 := 0;
|
Status : Boolean;
|
function Sequence_Step_Enabled
|
(Step : VL53L0x_Sequence_Step;
|
Sequence_Config : UInt8) return Boolean;
|
---------------------------
|
-- Sequence_Step_Enabled --
|
---------------------------
|
function Sequence_Step_Enabled
|
(Step : VL53L0x_Sequence_Step;
|
Sequence_Config : UInt8) return Boolean
|
is
|
begin
|
case Step is
|
when TCC =>
|
return (Sequence_Config and 16#10#) /= 0;
|
when DSS =>
|
return (Sequence_Config and 16#08#) /= 0;
|
when MSRC =>
|
return (Sequence_Config and 16#04#) /= 0;
|
when Pre_Range =>
|
return (Sequence_Config and 16#40#) /= 0;
|
when Final_Range =>
|
return (Sequence_Config and 16#80#) /= 0;
|
end case;
|
end Sequence_Step_Enabled;
|
begin
|
Read (This, REG_SYSTEM_SEQUENCE_CONFIG, Sequence_Config, Status);
|
if not Status then
|
return (others => False);
|
end if;
|
for Step in Sequence_Steps'Range loop
|
Sequence_Steps (Step) :=
|
Sequence_Step_Enabled (Step, Sequence_Config);
|
end loop;
|
return Sequence_Steps;
|
end Sequence_Step_Enabled;
|
---------------------------
|
-- Sequence_Step_Timeout --
|
---------------------------
|
function Sequence_Step_Timeout
|
(This : VL53L0X_Ranging_Sensor;
|
Step : VL53L0x_Sequence_Step;
|
As_Mclks : Boolean := False) return UInt32
|
is
|
VCSel_Pulse_Period_Pclk : UInt8;
|
Encoded_UInt8 : UInt8;
|
Encoded_UInt16 : UInt16;
|
Status : Boolean;
|
Timeout_Mclks : UInt32;
|
Sequence_Steps : VL53L0x_Sequence_Step_Enabled;
|
begin
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.