radar-bgt60  1.1.1
C++ library for the BGT60LTR11AIP - XENSIV™ 60 Ghz Radar from Infineon
Collaboration diagram for BGT60 API:

Data Structures

class  Bgt60Ino
 

Functions

 Bgt60Ino::Bgt60Ino (uint8_t targetDet, uint8_t phaseDet)
 Constructor of the Arduino Bgt60 object. More...
 
 Bgt60Ino::~Bgt60Ino ()
 Destructor of the Arduino Bgt60 object. More...
 
Error_t Bgt60Ino::begin ()
 Begin the radar board. More...
 
Error_t Bgt60Ino::end ()
 Ends the radar board. More...
 

Detailed Description


Data Structure Documentation

◆ Bgt60Ino

class Bgt60Ino
Inheritance diagram for Bgt60Ino:
Collaboration diagram for Bgt60Ino:

Public Types

enum  Motion_t { NO_MOTION = 1, MOTION = 2 }
 States of motion. More...
 
enum  Direction_t { NO_DIR = 0, APPROACHING = 1, DEPARTING = 2 }
 States of direction. More...
 

Public Member Functions

 Bgt60Ino (uint8_t targetDet, uint8_t phaseDet)
 Constructor of the Arduino Bgt60 object. More...
 
 ~Bgt60Ino ()
 Destructor of the Arduino Bgt60 object. More...
 
Error_t begin ()
 Begin the radar board. More...
 
Error_t end ()
 Ends the radar board. More...
 
Error_t init ()
 Initialize the Bgt60 class object. More...
 
Error_t deinit ()
 De-Initialize the Bgt60 class object. More...
 
Error_t getMotion (Motion_t &motion)
 Read out target-detect-pin. More...
 
Error_t getDirection (Direction_t &direction)
 Read out phase-detect-pin. More...
 
Error_t enableInterrupt (void(*cback)(void))
 Enables the hardware interrupt. More...
 
Error_t disableInterrupt (void)
 Disables the hardware interrupt. More...
 

Member Enumeration Documentation

◆ Motion_t

enum Bgt60::Motion_t
inherited

States of motion.

Enumerator
NO_MOTION 

No presence

MOTION 

Presence

◆ Direction_t

enum Bgt60::Direction_t
inherited

States of direction.

Enumerator
NO_DIR 

No direction due to no motion

APPROACHING 

Target approaching

DEPARTING 

Target departing

Member Function Documentation

◆ init()

Error_t Bgt60::init ( )
inherited

Initialize the Bgt60 class object.

Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Precondition
None
Here is the call graph for this function:

◆ deinit()

Error_t Bgt60::deinit ( )
inherited

De-Initialize the Bgt60 class object.

Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Precondition
init()
Here is the call graph for this function:

◆ getMotion()

Error_t Bgt60::getMotion ( Motion_t motion)
inherited

Read out target-detect-pin.

This function reads out the target-detect-pin. Depending on the choosen mode of the board it is either actively polling the status of the pin or mapping an interrupt to the corresponding pin.

Note
If you're using the interrupt mode of the board just call this function once in the setup(). For each object of the BGT60 this function can be called once. Calling it more often can lead to undesired behavior of the radar board.
Parameters
[in,out]motionThis variable stores the actual state of the target-detect-pin Possible Values:
  • NO_MOTION
  • MOTION
Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Precondition
init()
Here is the call graph for this function:

◆ getDirection()

Error_t Bgt60::getDirection ( Direction_t direction)
inherited

Read out phase-detect-pin.

This function reads out the phase-detect-pin. Depending on the choosen mode of the board it is either actively polling the status of the pin or mapping an interrupt to the corresponding pin.

Note
If you're using the interrupt mode of the board just call this function once in the setup(). For each object of the BGT60 this function can be called once. Calling it more often can lead to undesired behavior of the radar board.
Parameters
[in,out]directionThis variable stores the actual state of the phase-detect-pin Possible Values:
  • NO_DIR
  • APPROACHING
  • DEPARTING
Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Precondition
init()
Here is the call graph for this function:

◆ enableInterrupt()

Error_t Bgt60::enableInterrupt ( void(*)(void)  cback)
inherited

Enables the hardware interrupt.

Parameters
[in]*cbackPointer to the interrupt callback function
Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif interface error
Precondition
init()
Here is the call graph for this function:

◆ disableInterrupt()

Error_t Bgt60::disableInterrupt ( void  )
inherited

Disables the hardware interrupt.

Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif interface error
Precondition
init()
Here is the call graph for this function:

Function Documentation

◆ Bgt60Ino()

Bgt60Ino::Bgt60Ino ( uint8_t  targetDet,
uint8_t  phaseDet 
)

Constructor of the Arduino Bgt60 object.

Parameters
[in]targetDetPin number of the target detect pin
[in]phaseDetPin number of the phase detect pin
[in]pinModeDesired mode of the board, polling or interrupt driven

◆ ~Bgt60Ino()

Bgt60Ino::~Bgt60Ino ( )

Destructor of the Arduino Bgt60 object.

◆ begin()

Error_t Bgt60Ino::begin ( )

Begin the radar board.

Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Here is the call graph for this function:

◆ end()

Error_t Bgt60Ino::end ( )

Ends the radar board.

Returns
Bgt60 error code
Return values
OKif success
INTF_ERRORif error
Here is the call graph for this function: