Multi Half-Bridge  4.0.0
Library of Infineon's Multi Half-Bridge IC controllers family
Collaboration diagram for PAL:

Data Structures

class  GPIORpi
 Raspberry Pi GPIO class. More...
 
class  SPICRpi
 Raspberry Pi SPIC class. More...
 
class  TimerRpi
 

Detailed Description


Data Structure Documentation

◆ GPIORpi

class GPIORpi

Raspberry Pi GPIO class.

Inheritance diagram for GPIORpi:
Collaboration diagram for GPIORpi:

Public Types

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

Public Member Functions

 GPIORpi ()
 Constructor of the Raspberry Pi GPIO class. More...
 
 GPIORpi (uint8_t pin, uint8_t mode, VLogic_t logic)
 Constructor of the Raspberry Pi GPIO class. More...
 
 ~GPIORpi ()
 
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 checkErrorStatus ()
 

Member Enumeration Documentation

◆ IntEvent_t

Enumerator
INT_FALLING_EDGE 

Interrupt on falling edge

INT_RISING_EDGE 

Interrupt on rising edge

◆ VLevel_t

enum tle94112::GPIOC::VLevel_t
inherited
Enumerator
GPIO_LOW 

Level low

GPIO_HIGH 

Level high

◆ VLogic_t

enum tle94112::GPIOC::VLogic_t
inherited
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

Constructor & Destructor Documentation

◆ GPIORpi() [1/2]

GPIORpi::GPIORpi ( )

Constructor of the Raspberry Pi GPIO class.

This function sets the basics for a GPIO.

◆ GPIORpi() [2/2]

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

Constructor of the Raspberry Pi GPIO class.

This function sets 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

◆ ~GPIORpi()

GPIORpi::~GPIORpi ( )
inline

Member Function Documentation

◆ init()

Error_t GPIORpi::init ( void  )
virtual

Initialize the GPIO.

This function initializes the chosen pin.

Returns
GPIORpi::Error_t

Implements tle94112::GPIOC.

◆ deinit()

Error_t GPIORpi::deinit ( )
virtual

Deinitialize the GPIO.

This function deinitializes the chosen pin.

Returns
GPIORpi::Error_t

Implements tle94112::GPIOC.

◆ read()

GPIORpi::VLevel_t GPIORpi::read ( )
virtual

Read GPIO logic level.

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

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

Implements tle94112::GPIOC.

◆ write()

Error_t GPIORpi::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
GPIORpi::Error_t

Implements tle94112::GPIOC.

◆ enable()

Error_t GPIORpi::enable ( )
virtual

Enable the GPIO.

This function enables the chosen pin. Depending on the chosen logic of the pin it sets the right logic level of the pin.

Returns
GPIORpi::Error_t

Implements tle94112::GPIOC.

◆ disable()

Error_t GPIORpi::disable ( )
virtual

Disable the GPIO.

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

Returns
GPIOIno::Error_t

Implements tle94112::GPIOC.

◆ checkErrorStatus()

Error_t GPIOC::checkErrorStatus ( )
inherited

◆ SPICRpi

class SPICRpi

Raspberry Pi SPIC class.

Inheritance diagram for SPICRpi:
Collaboration diagram for SPICRpi:

Public Member Functions

 SPICRpi ()
 Constructor of the Raspberry Pi SPIC class. More...
 
 SPICRpi (uint8_t lsb, uint8_t mode, uint8_t clock)
 Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class. More...
 
 SPICRpi (uint8_t csPin, uint8_t misoPin, uint8_t mosiPin, uint8_t sckPin)
 Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class. More...
 
 ~SPICRpi ()
 
Error_t init ()
 Initialize the SPIC. More...
 
Error_t deinit ()
 Deinitialize the SPIC. More...
 
Error_t transfer (uint8_t send, uint8_t &received)
 transfers a data package via the spi bus More...
 
Error_t transfer16 (uint16_t send, uint16_t &received)
 transfers a data package via the spi bus with 16 bit length More...
 
Error_t checkErrorStatus ()
 

Constructor & Destructor Documentation

◆ SPICRpi() [1/3]

SPICRpi::SPICRpi ( )

Constructor of the Raspberry Pi SPIC class.

This function sets the basics for a SPIC and the default SPI.

◆ SPICRpi() [2/3]

SPICRpi::SPICRpi ( uint8_t  lsb,
uint8_t  mode,
uint8_t  clock 
)

Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class.

This function sets some basic SPI modes for the default SPI port.

Parameters
lsblowside (LSB) or highside (MSB) mode
modeSPI mode
clockSPI clock divider

◆ SPICRpi() [3/3]

SPICRpi::SPICRpi ( uint8_t  csPin,
uint8_t  misoPin,
uint8_t  mosiPin,
uint8_t  sckPin 
)

Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class.

This function sets all pins for a given SPI port, allowing a free setting of the SPI interface

Parameters
csPinchipselect pin for the SPI port
misoPinmiso pin number
mosiPinmosi pin number
sckPinsystemclock pin number

◆ ~SPICRpi()

SPICRpi::~SPICRpi ( )
inline

Member Function Documentation

◆ init()

Error_t SPICRpi::init ( void  )
virtual

Initialize the SPIC.

This function initializes the chosen spi channel with the given values for lsb,clock and mode

Returns
SPICRpi::Error_t

Implements tle94112::SPIC.

◆ deinit()

Error_t SPICRpi::deinit ( )
virtual

Deinitialize the SPIC.

This function deinitializes the chosen spi channel.

Returns
SPICRpi::Error_t

Implements tle94112::SPIC.

◆ transfer()

Error_t SPICRpi::transfer ( uint8_t  send,
uint8_t &  received 
)
virtual

transfers a data package via the spi bus

Parameters
sendaddress and/or command to send
receivedreceived data from spi bus
Returns
SPICRpi::Error_t

Implements tle94112::SPIC.

◆ transfer16()

Error_t SPICRpi::transfer16 ( uint16_t  send,
uint16_t &  received 
)
virtual

transfers a data package via the spi bus with 16 bit length

Parameters
sendaddress and/or command to send
receivedreceived data from spi bus
Returns
SPICRpi::Error_t

Implements tle94112::SPIC.

◆ checkErrorStatus()

Error_t SPIC::checkErrorStatus ( )
inherited

◆ TimerRpi

class TimerRpi
Inheritance diagram for TimerRpi:
Collaboration diagram for TimerRpi:

Public Member Functions

 TimerRpi ()
 Constructor of the Raspberry Pi Timer class. More...
 
 ~TimerRpi ()
 Destructor of the Raspberry Pi Timer class. More...
 
Error_t init ()
 Initialization of the Timer. More...
 
Error_t deinit ()
 Deinitialize the Timer. More...
 
Error_t start ()
 Start the timer. More...
 
Error_t elapsed (uint32_t &elapsed)
 Calculate the elapsed time. More...
 
Error_t stop ()
 Stop the timer. More...
 
Error_t delayMilli (uint32_t timeout)
 Time delay. More...
 
Error_t delayMicro (uint32_t timeout)
 Time delay. More...
 

Constructor & Destructor Documentation

◆ TimerRpi()

TimerRpi::TimerRpi ( )

Constructor of the Raspberry Pi Timer class.

◆ ~TimerRpi()

TimerRpi::~TimerRpi ( )

Destructor of the Raspberry Pi Timer class.

Member Function Documentation

◆ init()

Error_t TimerRpi::init ( void  )
virtual

Initialization of the Timer.

This function initializes the Timer and sets the elapsed time to zero.

Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ deinit()

Error_t TimerRpi::deinit ( )
virtual

Deinitialize the Timer.

This function deinitializes the Timer and also resets the elapsed time to variable.

Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ start()

Error_t TimerRpi::start ( )
virtual

Start the timer.

This function starts the timer.

Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ elapsed()

Error_t TimerRpi::elapsed ( uint32_t &  elapsed)
virtual

Calculate the elapsed time.

This function calculates the elapsed time since the start of the timer. The value stored in the given variable is in milliseconds.

Parameters
[in]&elapsedAddress of a value where the elapsed time should be stored
Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ stop()

Error_t TimerRpi::stop ( )
virtual

Stop the timer.

This function stops the timer and resets the start time variable.

Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ delayMilli()

Error_t TimerRpi::delayMilli ( uint32_t  timeout)
virtual

Time delay.

This function causes a desired delay of the application. The input value is given in milliseconds.

Parameters
[in]timeoutDesired timeout in ms
Returns
TimerRpi::Error_t

Implements tle94112::Timer.

◆ delayMicro()

Error_t TimerRpi::delayMicro ( uint32_t  timeout)
virtual

Time delay.

This function causes a desired delay of the application. The input value is given in microseconds.

Parameters
[in]timeoutDesired timeout in us
Returns
TimerRpi::Error_t

Implements tle94112::Timer.