radar-bgt60  1.1.1
C++ library for the BGT60LTR11AIP - XENSIV™ 60 Ghz Radar from Infineon
Platform Abstraction Layer Interface
Collaboration diagram for Platform Abstraction Layer Interface:

Data Structures

class  bgt60::GPIO
 
class  bgt60::Timer
 

Functions

virtual Error_t bgt60::GPIO::init ()=0
 Initializes the GPIO. More...
 
virtual Error_t bgt60::GPIO::deinit ()=0
 Deinitializes the GPIO. More...
 
virtual VLevel_t bgt60::GPIO::read ()=0
 Reads the GPIO voltage level. More...
 
virtual Error_t bgt60::GPIO::write (VLevel_t level)=0
 Writes the GPIO output voltage level. More...
 
virtual Error_t bgt60::GPIO::enable ()=0
 Enables the GPIO output according to the GPIO logic. More...
 
virtual Error_t bgt60::GPIO::disable ()=0
 Disables the GPIO output according to the GPIO logic. More...
 
virtual Error_t bgt60::GPIO::enableInt (void(*cback)(void), IntEvent_t mode)=0
 Enables the GPIO hardware interrupt. More...
 
virtual Error_t bgt60::GPIO::disableInt ()=0
 Disables the GPIO hardware interrupt. More...
 
virtual IntEvent_t bgt60::GPIO::intEvent ()=0
 Gets the latest interrupt event. More...
 

Interrupt event

enum  bgt60::GPIO::IntEvent_t {
  bgt60::GPIO::INT_FALLING_EDGE = 0 , bgt60::GPIO::INT_RISING_EDGE = 1 , bgt60::GPIO::INT_HIGH = 2 , bgt60::GPIO::INT_LOW = 3 ,
  bgt60::GPIO::INT_CHANGE = 4
}
 

Voltage level

enum  bgt60::GPIO::VLevel_t { bgt60::GPIO::GPIO_LOW = 0 , bgt60::GPIO::GPIO_HIGH = 1 }
 

Voltage logic

enum  bgt60::GPIO::VLogic_t { bgt60::GPIO::NEGATIVE = 1 , bgt60::GPIO::POSITIVE = 2 }
 

Detailed Description


Data Structure Documentation

◆ bgt60::GPIO

class bgt60::GPIO
Inheritance diagram for bgt60::GPIO:

Public Types

Interrupt event
enum  IntEvent_t {
  INT_FALLING_EDGE = 0 , INT_RISING_EDGE = 1 , INT_HIGH = 2 , INT_LOW = 3 ,
  INT_CHANGE = 4
}
 
Voltage level
enum  VLevel_t { GPIO_LOW = 0 , GPIO_HIGH = 1 }
 
Voltage logic
enum  VLogic_t { NEGATIVE = 1 , POSITIVE = 2 }
 

Public Member Functions

virtual Error_t init ()=0
 Initializes the GPIO. More...
 
virtual Error_t deinit ()=0
 Deinitializes the GPIO. More...
 
virtual VLevel_t read ()=0
 Reads the GPIO voltage level. More...
 
virtual Error_t write (VLevel_t level)=0
 Writes the GPIO output voltage level. More...
 
virtual Error_t enable ()=0
 Enables the GPIO output according to the GPIO logic. More...
 
virtual Error_t disable ()=0
 Disables the GPIO output according to the GPIO logic. More...
 
virtual Error_t enableInt (void(*cback)(void), IntEvent_t mode)=0
 Enables the GPIO hardware interrupt. More...
 
virtual Error_t disableInt ()=0
 Disables the GPIO hardware interrupt. More...
 
virtual IntEvent_t intEvent ()=0
 Gets the latest interrupt event. More...
 

◆ bgt60::Timer

class bgt60::Timer
Inheritance diagram for bgt60::Timer:

Public Member Functions

virtual Error_t init ()=0
 Initialiazes the timer. More...
 
virtual Error_t deinit ()=0
 Deinitialiazes the timer. More...
 
virtual Error_t start ()=0
 Starts the timer. More...
 
virtual Error_t elapsed (uint32_t &elapsed)=0
 Elapsed time since the timer was started in milliseconds. More...
 
virtual Error_t elapsedMicro (uint32_t &elapsed)=0
 Elapsed time since the timer was started in microseconds. More...
 
virtual Error_t stop ()=0
 Stops the timer. More...
 
virtual Error_t delay (const uint32_t timeout)=0
 Introduces a delay during the specified time. More...
 

Member Function Documentation

◆ init()

virtual Error_t bgt60::Timer::init ( )
pure virtual

Initialiazes the timer.

Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ deinit()

virtual Error_t bgt60::Timer::deinit ( )
pure virtual

Deinitialiazes the timer.

Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ start()

virtual Error_t bgt60::Timer::start ( )
pure virtual

Starts the timer.

Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ elapsed()

virtual Error_t bgt60::Timer::elapsed ( uint32_t &  elapsed)
pure virtual

Elapsed time since the timer was started in milliseconds.

Parameters
[out]elapsedTime in milliseconds
Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ elapsedMicro()

virtual Error_t bgt60::Timer::elapsedMicro ( uint32_t &  elapsed)
pure virtual

Elapsed time since the timer was started in microseconds.

Parameters
[out]elapsedTime in microseconds
Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ stop()

virtual Error_t bgt60::Timer::stop ( )
pure virtual

Stops the timer.

Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

◆ delay()

virtual Error_t bgt60::Timer::delay ( const uint32_t  timeout)
pure virtual

Introduces a delay during the specified time.

Parameters
[in]timeoutDelay time in milliseconds
Returns
BGT60 error code
Return values
OKif success

Implemented in TimerIno.

Enumeration Type Documentation

◆ IntEvent_t

Enumerator
INT_FALLING_EDGE 

Interrupt on falling edge

INT_RISING_EDGE 

Interrupt on rising edge

INT_HIGH 

Interrupt when pin is HIGH

INT_LOW 

Interrupt when pin is LOW

INT_CHANGE 

Interrupt when pin changes its level

◆ VLevel_t

Enumerator
GPIO_LOW 

Level low

GPIO_HIGH 

Level high

◆ VLogic_t

Enumerator
NEGATIVE 

Negative logic. 0 on voltage level high, 1 on voltage low

POSITIVE 

Positive logic. 1 on voltage level high, 0 on voltage low

Function Documentation

◆ init()

virtual Error_t bgt60::GPIO::init ( )
pure virtual

Initializes the GPIO.

Returns
BGT60 error code
Return values
OKif success

Implemented in GPIORpi, and GPIOIno.

◆ deinit()

virtual Error_t bgt60::GPIO::deinit ( )
pure virtual

Deinitializes the GPIO.

Returns
BGT60 error code
Return values
OKif success

Implemented in GPIORpi, and GPIOIno.

◆ read()

virtual VLevel_t bgt60::GPIO::read ( )
pure virtual

Reads the GPIO voltage level.

Returns
GPIO voltage level
Return values
GPIO_LOWif voltage low
GPIO_HIGHif voltage high

Implemented in GPIORpi, and GPIOIno.

◆ write()

virtual Error_t bgt60::GPIO::write ( VLevel_t  level)
pure virtual

Writes the GPIO output voltage level.

Parameters
[in]levelVoltage level
Returns
BGT60 error code
Return values
OKif success
WRITE_ERRORif write error

Implemented in GPIORpi, and GPIOIno.

◆ enable()

virtual Error_t bgt60::GPIO::enable ( )
pure virtual

Enables the GPIO output according to the GPIO logic.

  • Low if negative
  • High if positive
    Returns
    GPIO interrupt event
    Return values
    OKif success
    WRITE_ERRORif write error

Implemented in GPIORpi, and GPIOIno.

◆ disable()

virtual Error_t bgt60::GPIO::disable ( )
pure virtual

Disables the GPIO output according to the GPIO logic.

  • Low if positive
  • High if negative
    Returns
    BGT60 error code
    Return values
    OKif success
    WRITE_ERRORif write error

Implemented in GPIORpi, and GPIOIno.

◆ enableInt()

virtual Error_t bgt60::GPIO::enableInt ( void(*)(void)  cback,
IntEvent_t  mode 
)
pure virtual

Enables the GPIO hardware interrupt.

Parameters
[in]*cbackFunction pointer of the interrupt callback
Returns
BGT60 error code
Return values
OKif success
INTF_ERRORif error

Implemented in GPIORpi, and GPIOIno.

◆ disableInt()

virtual Error_t bgt60::GPIO::disableInt ( )
pure virtual

Disables the GPIO hardware interrupt.

Returns
BGT60 error code
Return values
OKif success
INTF_ERRORif disable error

Implemented in GPIORpi, and GPIOIno.

◆ intEvent()

virtual IntEvent_t bgt60::GPIO::intEvent ( )
pure virtual

Gets the latest interrupt event.

Returns
GPIO interrupt event
Return values
INT_FALLING_EDGEif falling edge event
INT_RISING_EDGEif rising edge event

Implemented in GPIORpi, and GPIOIno.