Data Structures | |
class | Bgt60 |
Error codes | |
enum | bgt60::Error_t { bgt60::OK = 0, bgt60::INTF_ERROR = -1, bgt60::CONF_ERROR = -2, bgt60::READ_ERROR = -3, bgt60::WRITE_ERROR = -4 } |
class Bgt60 |
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 | |
Bgt60 (GPIO *tDet, GPIO *pDet) | |
Radar Bgt60 constructor. More... | |
~Bgt60 () | |
Radar Bgt60 destructor. 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... | |
enum Bgt60::Motion_t |
enum Bgt60::Direction_t |
Radar Bgt60 constructor.
This is the constructor of the Radar BGT60 board. The user has to pass the two desired pins for reading out the radar data, as well as the mode in which the board should acquire the data.
[in] | *tDet | Instance of a GPIO to read the target-detect-pin |
[in] | *pDet | Instance of a GPIO to read the phase-detect-pin |
Bgt60::~Bgt60 | ( | ) |
Radar Bgt60 destructor.
Error_t Bgt60::init | ( | ) |
Error_t Bgt60::deinit | ( | ) |
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.
[in,out] | motion | This variable stores the actual state of the target-detect-pin Possible Values:
|
OK | if success |
INTF_ERROR | if error |
Error_t Bgt60::getDirection | ( | Direction_t & | direction | ) |
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.
[in,out] | direction | This variable stores the actual state of the phase-detect-pin Possible Values:
|
OK | if success |
INTF_ERROR | if error |
Error_t Bgt60::enableInterrupt | ( | void(*)(void) | cback | ) |
enum bgt60::Error_t |