
Data Structures | |
| class | GPIORpi |
| Raspberry Pi GPIO class. More... | |
| class | SPICRpi |
| Raspberry Pi SPIC class. More... | |
| class | TimerRpi |
| class GPIORpi |
Raspberry Pi GPIO 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 | |
| GPIORpi () | |
| Constructor of the Raspberry Pi GPIO class. | |
| GPIORpi (uint8_t pin, uint8_t mode, VLogic_t logic) | |
| Constructor of the Raspberry Pi GPIO class. | |
| ~GPIORpi () | |
| Error_t | init () |
| Initialize the GPIO. | |
| Error_t | deinit () |
| Deinitialize the GPIO. | |
| VLevel_t | read () |
| Read GPIO logic level. | |
| Error_t | write (VLevel_t level) |
| Set GPIO logic level. | |
| Error_t | enable () |
| Enable the GPIO. | |
| Error_t | disable () |
| Disable the GPIO. | |
| Error_t | checkErrorStatus () |
|
inherited |
|
inherited |
|
inherited |
| GPIORpi::GPIORpi | ( | ) |
Constructor of the Raspberry Pi GPIO class.
This function sets the basics for a GPIO.
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.
| [in] | pin | Number of the desired pin |
| [in] | mode | Defines the mode of the pin (INPUT, OUTPUT, etc.) |
| [in] | logic | Defines the logic level of the pin |
|
inline |
|
virtual |
Initialize the GPIO.
This function initializes the chosen pin.
Implements tle94112::GPIOC.
|
virtual |
Deinitialize the GPIO.
This function deinitializes the chosen pin.
Implements tle94112::GPIOC.
|
virtual |
Read GPIO logic level.
This function reads the logic level of the chosen pin and returns the logic level value.
| 0 | = GPIO_LOW |
| 1 | = GPIO_HIGH |
Implements tle94112::GPIOC.
Set GPIO logic level.
This functions sets the logic level of the chosen pin.
| [in] | level | Desired logic level of the pin |
Implements tle94112::GPIOC.
|
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.
Implements tle94112::GPIOC.
|
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.
Implements tle94112::GPIOC.
|
inherited |
| class SPICRpi |
Raspberry Pi SPIC class.


Public Member Functions | |
| SPICRpi () | |
| Constructor of the Raspberry Pi SPIC class. | |
| SPICRpi (uint8_t lsb, uint8_t mode, uint8_t clock) | |
| Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class. | |
| 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. | |
| ~SPICRpi () | |
| 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 with 16 bit length | |
| Error_t | checkErrorStatus () |
| SPICRpi::SPICRpi | ( | ) |
Constructor of the Raspberry Pi SPIC class.
This function sets the basics for a SPIC and the default SPI.
Construct a new SPICRpi::SPICRpi object of the Raspberry Pi SPIC class.
This function sets some basic SPI modes for the default SPI port.
| lsb | lowside (LSB) or highside (MSB) mode |
| mode | SPI mode |
| clock | SPI clock divider |
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
| csPin | chipselect pin for the SPI port |
| misoPin | miso pin number |
| mosiPin | mosi pin number |
| sckPin | systemclock pin number |
|
inline |
|
virtual |
Initialize the SPIC.
This function initializes the chosen spi channel with the given values for lsb,clock and mode
Implements tle94112::SPIC.
|
virtual |
Deinitialize the SPIC.
This function deinitializes the chosen spi channel.
Implements tle94112::SPIC.
transfers a data package via the spi bus
| send | address and/or command to send |
| received | received data from spi bus |
Implements tle94112::SPIC.
transfers a data package via the spi bus with 16 bit length
| send | address and/or command to send |
| received | received data from spi bus |
Implements tle94112::SPIC.
|
inherited |
| class TimerRpi |


Public Member Functions | |
| TimerRpi () | |
| Constructor of the Raspberry Pi Timer class. | |
| ~TimerRpi () | |
| Destructor of the Raspberry Pi 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. | |
| TimerRpi::TimerRpi | ( | ) |
Constructor of the Raspberry Pi Timer class.
| TimerRpi::~TimerRpi | ( | ) |
Destructor of the Raspberry Pi Timer class.
|
virtual |
Initialization of the Timer.
This function initializes the Timer and sets the elapsed time to zero.
Implements tle94112::Timer.
|
virtual |
Deinitialize the Timer.
This function deinitializes the Timer and also resets the elapsed time to variable.
Implements tle94112::Timer.
|
virtual |
Start the timer.
This function starts the timer.
Implements tle94112::Timer.
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.
| [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 causes 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 causes a desired delay of the application. The input value is given in microseconds.
| [in] | timeout | Desired timeout in us |
Implements tle94112::Timer.