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

Data Structures

class  GPIOWiced
 WiCED gpio wrapper. More...
 
class  SPICWiced
 Wiced SPIC class. More...
 
class  TimerWiced
 WiCED timer wrapper. More...
 

Detailed Description


Data Structure Documentation

◆ GPIOWiced

class GPIOWiced

WiCED gpio wrapper.

Inheritance diagram for GPIOWiced:
Collaboration diagram for GPIOWiced:

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

 GPIOWiced (wiced_gpio_t pin, wiced_gpio_config_t config, VLogic_t logic)
 GPIO WICED default constructor. More...
 
 ~GPIOWiced ()
 GPIO WICED destructor. More...
 
Error_t init ()
 Initializes the WICED GPIO. More...
 
Error_t deinit ()
 Initializes the WICED GPIO. More...
 
VLevel_t read ()
 Reads the WICED GPIO voltage level. More...
 
Error_t write (VLevel_t level)
 Writes the WICED GPIO output voltage level. More...
 
Error_t enable ()
 Enables the WICED output according to the GPIO logic. More...
 
Error_t disable ()
 Disables the WICED output according to the GPIO logic. 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

◆ GPIOWiced()

GPIOWiced::GPIOWiced ( wiced_gpio_t  pin,
wiced_gpio_config_t  config,
VLogic_t  logic 
)

GPIO WICED default constructor.

◆ ~GPIOWiced()

GPIOWiced::~GPIOWiced ( )

GPIO WICED destructor.

Here is the call graph for this function:

Member Function Documentation

◆ init()

Error_t GPIOWiced::init ( void  )
inlinevirtual

Initializes the WICED GPIO.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif initialization error

Implements tle94112::GPIOC.

◆ deinit()

Error_t GPIOWiced::deinit ( )
inlinevirtual

Initializes the WICED GPIO.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif deinitialization error

Implements tle94112::GPIOC.

◆ read()

GPIOWiced::VLevel_t GPIOWiced::read ( )
inlinevirtual

Reads the WICED GPIO voltage level.

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

Implements tle94112::GPIOC.

◆ write()

Error_t GPIOWiced::write ( VLevel_t  level)
inlinevirtual

Writes the WICED GPIO output voltage level.

Parameters
[in]levelVoltage level
Returns
GPIO error code
Return values
OKif success
INTF_ERRORif error

Implements tle94112::GPIOC.

◆ enable()

Error_t GPIOWiced::enable ( )
inlinevirtual

Enables the WICED output according to the GPIO logic.

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

Implements tle94112::GPIOC.

◆ disable()

Error_t GPIOWiced::disable ( )
inlinevirtual

Disables the WICED output according to the GPIO logic.

  • Low if positive
  • High if negative
    Returns
    GPIO error code
    Return values
    OKif success
    INTF_ERRORif error

Implements tle94112::GPIOC.

◆ checkErrorStatus()

Error_t GPIOC::checkErrorStatus ( )
inherited

◆ SPICWiced

class SPICWiced

Wiced SPIC class.

Inheritance diagram for SPICWiced:
Collaboration diagram for SPICWiced:

Public Member Functions

 SPICWiced ()
 Constructor of the WICED SPIC class. More...
 
 SPICWiced (wiced_spi_t port, wiced_gpio_t csPin)
 Construct a new SPICWiced::SPICWiced object. More...
 
 SPICWiced (wiced_spi_t port, wiced_gpio_t csPin, uint8_t speed, uint8_t mode, uint8_t bits)
 Construct a new SPICWiced::SPICWiced object. More...
 
 ~SPICWiced ()
 Destructor of the WICED SPIC class. More...
 
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 More...
 
Error_t checkErrorStatus ()
 

Constructor & Destructor Documentation

◆ SPICWiced() [1/3]

SPICWiced::SPICWiced ( )

Constructor of the WICED SPIC class.

This function is setting the basics for a SPIC and the default spi on Arduino which is implemented as WICED_SPI_0 by patching the following:

  • <WICED_SDK>/platforms/<platform_name>/platform.h add WICED_SPI_0, to the wiced_spi_t
  • <WICED_SDK>/platforms/<platform_name>/platform.c add the following to the platform_spi_peripherals [WICED_SPI_0] = { .port = BCM4390X_SPI_0, .pin_mosi = &platform_gpio_pins[WICED_GPIO_6], .pin_miso = &platform_gpio_pins[WICED_GPIO_8], .pin_clock = &platform_gpio_pins[WICED_GPIO_5], .pin_cs = &platform_gpio_pins[WICED_GPIO_7], .driver = &spi_bb_driver, }, which sets the Arduino header GPIOs and the bit banging driver.

◆ SPICWiced() [2/3]

SPICWiced::SPICWiced ( wiced_spi_t  port,
wiced_gpio_t  csPin 
)

Construct a new SPICWiced::SPICWiced object.

This function is setting the basics for a SPIC. It allows to set the SPI channel and the used GPIOs if they are different from the standard GPIOs.

Parameters
portSPI channel to be used
csPinNumber of the desired ChipSelect pin
Attention
Yet not implemented

◆ SPICWiced() [3/3]

SPICWiced::SPICWiced ( wiced_spi_t  port,
wiced_gpio_t  csPin,
uint8_t  speed,
uint8_t  mode,
uint8_t  bits 
)

Construct a new SPICWiced::SPICWiced object.

This function allows to set all parameters of the SPI master.

Parameters
portSPI channel to be used
csPinNumber of the desired ChipSelect pin
speedSPI baud setting
modeSPI mode setting
bitsnumber of bits in one command
Attention
This does not set the platform_spi_peripherals structure yet

◆ ~SPICWiced()

SPICWiced::~SPICWiced ( )

Destructor of the WICED SPIC class.

Here is the call graph for this function:

Member Function Documentation

◆ init()

Error_t SPICWiced::init ( void  )
virtual

Initialize the SPIC.

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

Returns
Error_t

Implements tle94112::SPIC.

◆ deinit()

Error_t SPICWiced::deinit ( )
virtual

Deinitialize the SPIC.

This function is deinitializing the chosen spi channel.

Returns
Error_t

Implements tle94112::SPIC.

◆ transfer()

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

Implements tle94112::SPIC.

◆ transfer16()

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

transfers a data package via the spi bus

Parameters
sendaddress and/or command to send as 16bit
receivedreceived data from spi bus as 16bit
Returns
Error_t

Implements tle94112::SPIC.

◆ checkErrorStatus()

Error_t SPIC::checkErrorStatus ( )
inherited

◆ TimerWiced

class TimerWiced

WiCED timer wrapper.

Inheritance diagram for TimerWiced:
Collaboration diagram for TimerWiced:

Public Member Functions

 TimerWiced ()
 Constructor of the WICED Timer class. More...
 
 ~TimerWiced ()
 Destructor of the WICED 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 (wiced_time_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...
 
virtual Error_t elapsed (uint32_t &elapsed)=0
 Elapsed time since the timer was started. More...
 

Constructor & Destructor Documentation

◆ TimerWiced()

TimerWiced::TimerWiced ( )

Constructor of the WICED Timer class.

◆ ~TimerWiced()

TimerWiced::~TimerWiced ( )

Destructor of the WICED Timer class.

Member Function Documentation

◆ init()

Error_t TimerWiced::init ( void  )
virtual

Initialization of the Timer.

This function is initializing the Timer and sets the elapsed time to zero.

Returns
Error_t

Implements tle94112::Timer.

◆ deinit()

Error_t TimerWiced::deinit ( )
virtual

Deinitialize the Timer.

This function deinitialize the Timer and also resets the elapsed time variable.

Returns
Error_t

Implements tle94112::Timer.

◆ start()

Error_t TimerWiced::start ( )
virtual

Start the timer.

This function is starting the timer.

Returns
Error_t

Implements tle94112::Timer.

◆ elapsed() [1/2]

Error_t TimerWiced::elapsed ( wiced_time_t &  elapsed)

Calculate the elapsed time.

This function is calculating 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
Error_t

◆ stop()

Error_t TimerWiced::stop ( )
virtual

Stop the timer.

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

Returns
Error_t

Implements tle94112::Timer.

◆ delayMilli()

Error_t TimerWiced::delayMilli ( uint32_t  timeout)
virtual

Time delay.

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

Parameters
[in]timeoutDesired timeout in ms
Returns
Error_t

Implements tle94112::Timer.

◆ delayMicro()

Error_t TimerWiced::delayMicro ( uint32_t  timeout)
virtual

Time delay.

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

Parameters
[in]timeoutDesired timeout in us
Returns
Error_t

Implements tle94112::Timer.

◆ elapsed() [2/2]

virtual Error_t tle94112::Timer::elapsed ( uint32_t &  elapsed)
pure virtualinherited

Elapsed time since the timer was started.

Parameters
[out]elapsedTime in milliseconds
Returns
Timer error code
Return values
OKif success
INIT_ERRORif hardware interface error

Implemented in TimerRpi, TimerMtb, and TimerIno.