AFBR-S50 API Reference Manual  v1.6.5
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
core_device.h
Go to the documentation of this file.
1 /*************************************************************************/
37 #ifndef CORE_DEVICE_H
38 #define CORE_DEVICE_H
39 
40 /*!***************************************************************************
41  * @defgroup core_device AFBR-S50 Explorer - Explorer Device functions
42  * @ingroup explorer_app
43  * @brief AFBR-S50 Explorer - Explorer Device functions
44  * @details Util functions for handling the Explorer device to be used
45  * by the rest of the API.
46  * @addtogroup core_device
47  * @{
48  *****************************************************************************/
49 
50 #include "explorer_types.h"
51 
52 /*!***************************************************************************
53  * @brief Gets the Argus device instance handle pointer.
54  * @param deviceID The Device ID of the selected Argus sensor.
55  * @return Returns the Argus device instance handle pointer.
56  *****************************************************************************/
58 
59 /*!***************************************************************************
60  * @brief Gets the Explorer instance handle pointer.
61  * @param deviceID The Device ID of the selected Argus sensor.
62  * @return Returns the Explorer instance handle pointer.
63  *****************************************************************************/
65 
66 /*!***************************************************************************
67  * @brief Gets the Explorer instance handle pointer given
68  * an Argus handle pointer.
69  * @param argus The Argus device pointer of the selected Argus sensor.
70  * @return Returns the Explorer instance handle pointer.
71  *****************************************************************************/
73 
74 /*!***************************************************************************
75  * @brief Gets the device ID of the specified Explorer instance pointer.
76  * @param explorer The AFBR-Explorer control block.
77  * @return The Device ID of the selected Explorer instance.
78  *****************************************************************************/
80 
81 /*!***************************************************************************
82  * @brief Gets the number of initialized Argus sensor devices.
83  * @return Returns the number of initialized Argus sensor devices.
84  *****************************************************************************/
86 
87 /*!***************************************************************************
88  * @brief Gets the initialized Explorer instance handle pointer
89  * given its index in the list. This is used to obtain a consecutive
90  * list of instances, regardless of their DeviceID (the DeviceID
91  * could be non-consecutive).
92  * @param index Index of the initialized Explorer instance.
93  * @return Returns the selected Explorer instance handle pointer.
94  *****************************************************************************/
96 
97 
98 /*!***************************************************************************
99  * @brief Initializes the associated Argus device handle belonging to an
100  * Explorer instance handle pointer.
101  * @param explorer Explorer instance handle pointer to be initialized.
102  * @param mode Selected mode for the Argus sensor device.
103  * @param reinit Indicate whether the device should first be deinitialized.
104  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
105  *****************************************************************************/
106 status_t ExplorerApp_InitDevice(explorer_t * explorer, argus_mode_t mode, bool reinit);
107 
108 /*!***************************************************************************
109  * @brief Reinitializes the device w/ default settings w/o MCU reset.
110  * @param explorer The AFBR-Explorer control block.
111  * @param mode The measurement mode to initialize with.
112  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
113  *****************************************************************************/
115 
116 /*!***************************************************************************
117  * @brief Initializes the selected Explorer instance handle pointer
118  * with the selected device ID.
119  * @param deviceID The Device ID of the selected Argus sensor.
120  * @return Returns the \link #status_t status\endlink (#STATUS_OK on success).
121  *****************************************************************************/
123 
125 #endif /* CORE_DEVICE_H */
argus_mode_t
argus_mode_t
The measurement modes.
Definition: argus_def.h:275
ExplorerApp_DeviceReinit
status_t ExplorerApp_DeviceReinit(explorer_t *explorer, argus_mode_t mode)
Reinitializes the device w/ default settings w/o MCU reset.
Definition: core_device.c:246
sci_device_t
uint8_t sci_device_t
Definition: sci.h:99
ExplorerApp_GetExplorerPtrFromArgus
explorer_t * ExplorerApp_GetExplorerPtrFromArgus(argus_hnd_t *argus)
Gets the Explorer instance handle pointer given an Argus handle pointer.
Definition: core_device.c:135
ExplorerApp_GetArgusPtr
argus_hnd_t * ExplorerApp_GetArgusPtr(sci_device_t deviceID)
Gets the Argus device instance handle pointer.
Definition: core_device.c:121
explorer_t
Definition: explorer_types.h:282
ExplorerApp_InitExplorer
status_t ExplorerApp_InitExplorer(sci_device_t deviceID)
Initializes the selected Explorer instance handle pointer with the selected device ID.
Definition: core_device.c:257
ExplorerApp_GetInitializedExplorerCount
uint8_t ExplorerApp_GetInitializedExplorerCount()
Gets the number of initialized Argus sensor devices.
Definition: core_device.c:149
ExplorerApp_InitDevice
status_t ExplorerApp_InitDevice(explorer_t *explorer, argus_mode_t mode, bool reinit)
Initializes the associated Argus device handle belonging to an Explorer instance handle pointer.
Definition: core_device.c:174
explorer_types.h
This file is part of the AFBR-S50 Explorer Demo Application.
argus_hnd_t
struct argus_hnd_t argus_hnd_t
Definition: argus_def.h:320
ExplorerApp_GetDeviceID
sci_device_t ExplorerApp_GetDeviceID(explorer_t *explorer)
Gets the device ID of the specified Explorer instance pointer.
Definition: core_device.c:168
ExplorerApp_GetInitializedExplorer
explorer_t * ExplorerApp_GetInitializedExplorer(uint8_t index)
Gets the initialized Explorer instance handle pointer given its index in the list....
Definition: core_device.c:160
ExplorerApp_GetExplorerPtr
explorer_t * ExplorerApp_GetExplorerPtr(sci_device_t deviceID)
Gets the Explorer instance handle pointer.
Definition: core_device.c:129
status_t
int32_t status_t
Type used for all status and error return values.
Definition: argus_status.h:70