
Data Structures | |
| class | GPIOMtb |
| ModusToolbox GPIO wrapper class. More... | |
| class | SPICMtb |
| class | TimerMtb |
| MoudusToolbox timer wrapper. More... | |
Macros | |
| #define | SPI_FREQ_HZ (1000000UL) |
| ModusToolbox SPIC class. | |
| class GPIOMtb |
ModusToolbox GPIO wrapper class.


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 | |
| GPIOMtb (cyhal_gpio_t pin, cyhal_gpio_direction_t dir, cyhal_gpio_drive_mode_t driveMode, VLogic_t logic) | |
| GPIO ModusToolbox HAL constructor. | |
| ~GPIOMtb () | |
| GPIO ModusToolbox destructor. | |
| Error_t | init () |
| Initializes the ModusToolbox GPIO. | |
| Error_t | deinit () |
| Initializes the ModusToolbox GPIO. | |
| VLevel_t | read () |
| Reads the ModusToolbox GPIO voltage level. | |
| Error_t | write (VLevel_t level) |
| Writes the ModusToolbox GPIO output voltage level. | |
| Error_t | enable () |
| Enables the ModusToolbox output according to the GPIO logic. | |
| Error_t | disable () |
| Disables the ModusToolbox output according to the GPIO logic. | |
| Error_t | checkErrorStatus () |
Static Public Attributes | |
| static const cyhal_gpio_t | unusedPin = CYHAL_NC_PIN_VALUE |
|
inherited |
|
inherited |
|
inherited |
| GPIOMtb::GPIOMtb | ( | cyhal_gpio_t | pin, |
| cyhal_gpio_direction_t | dir, | ||
| cyhal_gpio_drive_mode_t | driveMode, | ||
| VLogic_t | logic | ||
| ) |
GPIO ModusToolbox HAL constructor.
| [in] | pin | GPIO pin number |
| [in] | dir | GPIO direction |
| [in] | driveMode | GPIO driver mode |
| [in] | logic | Voltage logic |
| GPIOMtb::~GPIOMtb | ( | ) |
GPIO ModusToolbox destructor.

|
inlinevirtual |
Initializes the ModusToolbox GPIO.
| OK | if success |
| ERROR | if initialization error |
Implements tle94112::GPIOC.
|
inlinevirtual |
Initializes the ModusToolbox GPIO.
| OK | if success |
| ERROR | if deinitialization error |
Implements tle94112::GPIOC.
|
inlinevirtual |
Reads the ModusToolbox GPIO voltage level.
| GPIO_LOW | if voltage low |
| GPIO_HIGH | if voltage high |
Implements tle94112::GPIOC.
Writes the ModusToolbox GPIO output voltage level.
| [in] | level | Voltage level |
| OK | if success |
| ERROR | if error |
Implements tle94112::GPIOC.
|
inlinevirtual |
Enables the ModusToolbox output according to the GPIO logic.
| OK | if success |
| ERROR | if error |
Implements tle94112::GPIOC.
|
inlinevirtual |
Disables the ModusToolbox output according to the GPIO logic.
| OK | if success |
| ERROR | if error |
Implements tle94112::GPIOC.
|
inherited |
|
static |
Unused pin
| class SPICMtb |


Public Member Functions | |
| SPICMtb (cyhal_gpio_t csPin, cyhal_gpio_t misoPin, cyhal_gpio_t mosiPin, cyhal_gpio_t sckPin) | |
| Construct a new SPICMtb object. | |
| ~SPICMtb () | |
| Destructor of the SPICMtb class. | |
| Error_t | init () |
| Initialize the SPIC. | |
| Error_t | deinit () |
| Deinitialize the SPIC. | |
| Error_t | transfer (uint8_t send, uint8_t &received) |
| Transfers a data package via the spi bus. | |
| Error_t | transfer16 (uint16_t send, uint16_t &received) |
| Transfers a data package via the spi bus. | |
| Error_t | checkErrorStatus () |
Static Public Attributes | |
| static const cyhal_gpio_t | unusedPin = CYHAL_NC_PIN_VALUE |
| SPICMtb::SPICMtb | ( | cyhal_gpio_t | csPin, |
| cyhal_gpio_t | misoPin, | ||
| cyhal_gpio_t | mosiPin, | ||
| cyhal_gpio_t | sckPin | ||
| ) |
Construct a new SPICMtb object.
This function allows to set all parameters of the SPI master.
| [in] | csPin | Number of the desired ChipSelect pin |
| [in] | misoPin | Number of the desired MISO pin |
| [in] | mosiPin | Number of the desired MOSI pin |
| [in] | sckPin | Number of the desired SystemClock pin |
| SPICMtb::~SPICMtb | ( | ) |
|
virtual |
Initialize the SPIC.
This function is initializing the chosen spi channel with the given values for lsb,clock and mode
Implements tle94112::SPIC.
|
virtual |
Deinitialize the SPIC.
This function is deinitializing the chosen spi channel.
Implements tle94112::SPIC.
Transfers a data package via the spi bus.
| [in] | send | address and/or command to send |
| [out] | received | received data from spi bus |
Implements tle94112::SPIC.
Transfers a data package via the spi bus.
| [in] | send | address and/or command to send as 16bit |
| [out] | received | received data from spi bus as 16bit |
Implements tle94112::SPIC.
|
inherited |
|
static |
Unused pin
| class TimerMtb |
MoudusToolbox timer wrapper.


Public Member Functions | |
| TimerMtb () | |
| ModusToolbox Timer configuration. | |
| ~TimerMtb () | |
| Destructor of the ModusToolbox Timer class. | |
| Error_t | init () |
| Initialization of the Timer. | |
| Error_t | deinit () |
| Deinitialize the Timer. | |
| Error_t | start () |
| Start the timer. | |
| Error_t | elapsed (uint32_t &elapsed) |
| Calculate the elapsed time. | |
| Error_t | stop () |
| Stop the timer. | |
| Error_t | delayMilli (uint32_t timeout) |
| Time delay. | |
| Error_t | delayMicro (uint32_t timeout) |
| Time delay. | |
| TimerMtb::TimerMtb | ( | ) |
ModusToolbox Timer configuration.
Constructor of the ModusToolbox Timer class
| TimerMtb::~TimerMtb | ( | ) |
Destructor of the ModusToolbox Timer class.
|
virtual |
Initialization of the Timer.
This function is initializing the Timer and sets the elapsed time to zero.
Implements tle94112::Timer.
|
virtual |
Deinitialize the Timer.
This function deinitialize the Timer and also resets the elapsed time variable.
Implements tle94112::Timer.
|
virtual |
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.
| [in] | &elapsed | Address of a value where the elapsed time should be stored |
Implements tle94112::Timer.

|
virtual |
Stop the timer.
This function stops the timer and resets the start time variable.
Implements tle94112::Timer.
Time delay.
This function is causing a desired delay of the application. The input value is given in milliseconds.
| [in] | timeout | Desired timeout in ms |
Implements tle94112::Timer.
Time delay.
This function is causing a desired delay of the application. The input value is given in microseconds.
| [in] | timeout | Desired timeout in us |
Implements tle94112::Timer.
| #define SPI_FREQ_HZ (1000000UL) |
ModusToolbox SPIC class.