Fully static class containing callback implementations for sh2 HAL lib.
More...
#include <BNO08xSH2HAL.hpp>
|
| static void | set_hal_imu (BNO08x *hal_imu) |
| | Sets the BNO08x driver object to be used with sh2 HAL lib callbacks. More...
|
| |
| static int | spi_open (sh2_Hal_t *self) |
| | Opens SPI instance by waiting for interrupt. More...
|
| |
| static void | spi_close (sh2_Hal_t *self) |
| | Closes SPI instance (nothing to do here, but required by sh2 HAL lib for cases where other communication protocols are used.) More...
|
| |
| static int | spi_read (sh2_Hal_t *self, uint8_t *pBuffer, unsigned len, uint32_t *t_us) |
| | SPI rx callback for sh2 HAL lib. More...
|
| |
| static int | spi_write (sh2_Hal_t *self, uint8_t *pBuffer, unsigned len) |
| | SPI tx callback for sh2 HAL lib. More...
|
| |
| static uint32_t | get_time_us (sh2_Hal_t *self) |
| | Get time in microseconds callback for sh2 HAL lib. More...
|
| |
| static void | hal_cb (void *cookie, sh2_AsyncEvent_t *pEvent) |
| | General event callback for sh2 HAL lib, used to notify tasks of reset. More...
|
| |
| static void | sensor_event_cb (void *cookie, sh2_SensorEvent_t *event) |
| | Sensor event callback for sh2 HAL lib, sends received reports to data_proc_task(). More...
|
| |
Fully static class containing callback implementations for sh2 HAL lib.
◆ get_time_us()
| uint32_t BNO08xSH2HAL::get_time_us |
( |
sh2_Hal_t * |
self | ) |
|
|
static |
Get time in microseconds callback for sh2 HAL lib.
- Parameters
-
| self | sh2 HAL lib object being used with BNO08x driver instance. |
- Returns
- Time in microseconds.
◆ hal_cb()
| void BNO08xSH2HAL::hal_cb |
( |
void * |
cookie, |
|
|
sh2_AsyncEvent_t * |
pEvent |
|
) |
| |
|
static |
General event callback for sh2 HAL lib, used to notify tasks of reset.
- Parameters
-
| cookie | User set input parameter as void pointer (unused), see sh2_Open(). |
| pEvent | Pointer to asynchronous event. |
- Returns
- void, nothing to return
◆ sensor_event_cb()
| void BNO08xSH2HAL::sensor_event_cb |
( |
void * |
cookie, |
|
|
sh2_SensorEvent_t * |
event |
|
) |
| |
|
static |
Sensor event callback for sh2 HAL lib, sends received reports to data_proc_task().
- Parameters
-
| cookie | User set input parameter as void pointer (unused), see sh2_Open(). |
| event | Pointer to sensor event. |
- Returns
- void, nothing to return
◆ set_hal_imu()
| void BNO08xSH2HAL::set_hal_imu |
( |
BNO08x * |
hal_imu | ) |
|
|
static |
Sets the BNO08x driver object to be used with sh2 HAL lib callbacks.
- Parameters
-
| hal_imu | Pointer to BNO08x driver object to be used with sh2 HAL lib callbacks. |
- Returns
- void, nothing to return
◆ spi_close()
| void BNO08xSH2HAL::spi_close |
( |
sh2_Hal_t * |
self | ) |
|
|
static |
Closes SPI instance (nothing to do here, but required by sh2 HAL lib for cases where other communication protocols are used.)
- Returns
- void, nothing to return
◆ spi_open()
| int BNO08xSH2HAL::spi_open |
( |
sh2_Hal_t * |
self | ) |
|
|
static |
Opens SPI instance by waiting for interrupt.
- Returns
- Always returns 0.
◆ spi_read()
| int BNO08xSH2HAL::spi_read |
( |
sh2_Hal_t * |
self, |
|
|
uint8_t * |
pBuffer, |
|
|
unsigned |
len, |
|
|
uint32_t * |
t_us |
|
) |
| |
|
static |
SPI rx callback for sh2 HAL lib.
- Parameters
-
| self | sh2 HAL lib object being used with BNO08x driver instance. |
| pBuffer | Buffer to store received packet. |
| len | Length of bytes to read. |
| t_us | Time in microseconds (unused, forced sh2 HAL lib required function type) |
- Returns
- Size of received packet in bytes, 0 on failure.
◆ spi_write()
| int BNO08xSH2HAL::spi_write |
( |
sh2_Hal_t * |
self, |
|
|
uint8_t * |
pBuffer, |
|
|
unsigned |
len |
|
) |
| |
|
static |
SPI tx callback for sh2 HAL lib.
- Parameters
-
| self | sh2 HAL lib object being used with BNO08x driver instance. |
| pBuffer | Buffer containing data to write. |
| len | Length in bytes to write. |
- Returns
- Size of sent data (len param), 0 on failure.
The documentation for this class was generated from the following files: