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

Data Structures

class  GPIOIno
 
class  TimerIno
 

Detailed Description


Data Structure Documentation

◆ GPIOIno

class GPIOIno
Inheritance diagram for GPIOIno:
Collaboration diagram for GPIOIno:

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

 GPIOIno ()
 Constructor of the Arduino GPIO class. More...
 
 GPIOIno (uint8_t pin, uint8_t mode, VLogic_t logic)
 Constructor of the Arduino GPIO class. More...
 
 ~GPIOIno ()
 
Error_t init ()
 Initialize the GPIO. More...
 
Error_t deinit ()
 Deinitialize the GPIO. More...
 
VLevel_t read ()
 Read GPIO logic level. More...
 
Error_t write (VLevel_t level)
 Set GPIO logic level. More...
 
Error_t enable ()
 Enable the GPIO. More...
 
Error_t disable ()
 Disable the GPIO. More...
 
Error_t enableInt (void(*cback)(void), IntEvent_t mode)
 Enables the Arduino GPIO interrupt. More...
 
Error_t disableInt ()
 Disables the Arduino GPIO interrupt. More...
 
IntEvent_t intEvent ()
 Gets the latest Arduino interrupt event. More...
 

Constructor & Destructor Documentation

◆ GPIOIno() [1/2]

GPIOIno::GPIOIno ( )

Constructor of the Arduino GPIO class.

This function is setting the basics for a GPIO.

◆ GPIOIno() [2/2]

GPIOIno::GPIOIno ( uint8_t  pin,
uint8_t  mode,
VLogic_t  logic 
)

Constructor of the Arduino GPIO class.

This function is setting the basics for a GPIO. It allows to set the pin number, mode of the pin and the logic level.

Parameters
[in]pinNumber of the desired pin
[in]modeDefines the mode of the pin (INPUT, OUTPUT, etc.)
[in]logicDefines the logic level of the pin

◆ ~GPIOIno()

GPIOIno::~GPIOIno ( )

Member Function Documentation

◆ init()

Error_t GPIOIno::init ( )
virtual

Initialize the GPIO.

This function is initializing the chosen pin.

Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ deinit()

Error_t GPIOIno::deinit ( )
virtual

Deinitialize the GPIO.

This function is deinitializing the chosen pin.

Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ read()

GPIOIno::VLevel_t GPIOIno::read ( )
virtual

Read GPIO logic level.

This function reads the logic level of the chosen pin and returns the logic level value.

Returns
GPIOIno::VLevel_t
Return values
0= GPIO_LOW
1= GPIO_HIGH

Implements bgt60::GPIO.

◆ write()

Error_t GPIOIno::write ( VLevel_t  level)
virtual

Set GPIO logic level.

This functions sets the logic level of the chosen pin.

Parameters
[in]levelDesired logic level of the pin
Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ enable()

Error_t GPIOIno::enable ( )
virtual

Enable the GPIO.

This functions enable the chosen pin. Depending on the chosen logic of the pin it sets the right logic level of the pin.

Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ disable()

Error_t GPIOIno::disable ( )
virtual

Disable the GPIO.

This functions disables the chosen pin. Depending on the chosen logic of the pin it sets the right logic level of the pin.

Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ enableInt()

Error_t GPIOIno::enableInt ( void(*)(void)  cback,
IntEvent_t  mode 
)
virtual

Enables the Arduino GPIO interrupt.

This function enables the interrupt on chosen pin. Depending on the mode, it triggers the interrupt.

Parameters
[in]*cbackFunction pointer of the interrupt callback
[in]modeEvent at which the interrupt will occur
Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ disableInt()

Error_t GPIOIno::disableInt ( )
virtual

Disables the Arduino GPIO interrupt.

This function disables the interrupt on chosen pin.

Returns
BGT60 error code
Return values
OK

Implements bgt60::GPIO.

◆ intEvent()

GPIOIno::IntEvent_t GPIOIno::intEvent ( )
inlinevirtual

Gets the latest Arduino interrupt event.

This function gets the latest interrupt event on the earlier configured GPIO pin.

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

Implements bgt60::GPIO.

◆ TimerIno

class TimerIno
Inheritance diagram for TimerIno:
Collaboration diagram for TimerIno:

Public Member Functions

 TimerIno ()
 Timer Ino constructor. More...
 
 ~TimerIno ()
 Timer Ino destructor. More...
 
Error_t init ()
 Initialiazes the Arduino timer. More...
 
Error_t deinit ()
 Deinitialiazes the Arduino timer. More...
 
Error_t start ()
 Starts the Arduino timer. More...
 
Error_t elapsed (uint32_t &elapsed)
 Elapsed time since the timer was started. More...
 
Error_t elapsedMicro (uint32_t &elapsed)
 Elapsed time since the timer was started in microseconds. More...
 
Error_t stop ()
 Stops the Arduino timer. More...
 
Error_t delay (const uint32_t timeout)
 Introduces a delay during the specified time. More...
 

Constructor & Destructor Documentation

◆ TimerIno()

TimerIno::TimerIno ( )

Timer Ino constructor.

◆ ~TimerIno()

TimerIno::~TimerIno ( )

Timer Ino destructor.

Member Function Documentation

◆ init()

Error_t TimerIno::init ( )
inlinevirtual

Initialiazes the Arduino timer.

Returns
BGT60 error code
Return values
OK

Implements bgt60::Timer.

◆ deinit()

Error_t TimerIno::deinit ( )
inlinevirtual

Deinitialiazes the Arduino timer.

Returns
BGT60 error code
Return values
OK

Implements bgt60::Timer.

◆ start()

Error_t TimerIno::start ( )
inlinevirtual

Starts the Arduino timer.

Returns
BGT60 error code
Return values
OK

Implements bgt60::Timer.

◆ elapsed()

Error_t TimerIno::elapsed ( uint32_t &  elapsed)
inlinevirtual

Elapsed time since the timer was started.

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

Implements bgt60::Timer.

◆ elapsedMicro()

Error_t TimerIno::elapsedMicro ( uint32_t &  elapsed)
inlinevirtual

Elapsed time since the timer was started in microseconds.

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

Implements bgt60::Timer.

Here is the call graph for this function:

◆ stop()

Error_t TimerIno::stop ( )
inlinevirtual

Stops the Arduino timer.

Returns
BGT60 error code
Return values
OK

Implements bgt60::Timer.

◆ delay()

Error_t TimerIno::delay ( const uint32_t  timeout)
inlinevirtual

Introduces a delay during the specified time.

Note
No delay() implementation since it cause troubles out of sketches https://www.arduino.cc/reference/en/language/functions/time/delay/
Parameters
[in]timeoutDelay time in milliseconds
Returns
BGT60 error code
Return values
OK

Implements bgt60::Timer.

Here is the call graph for this function: