sbgECom Library
4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
|
Commands used to configure device serial, CAN and Ethernet interfaces. More...
Go to the source code of this file.
Data Structures | |
struct | _SbgEComInterfaceConf |
Typedefs | |
typedef enum _SbgEComPortId | SbgEComPortId |
typedef enum _SbgEComPortMode | SbgEComPortMode |
typedef struct _SbgEComInterfaceConf | SbgEComInterfaceConf |
typedef enum _SbgEComCanBitRate | SbgEComCanBitRate |
typedef enum _SbgEComCanMode | SbgEComCanMode |
Enumerations | |
enum | _SbgEComPortId { SBG_ECOM_IF_COM_A = 0 , SBG_ECOM_IF_COM_B = 1 , SBG_ECOM_IF_COM_C = 2 , SBG_ECOM_IF_COM_D = 3 , SBG_ECOM_IF_COM_E = 4 , SBG_ECOM_IF_ETH_0 = 10 , SBG_ECOM_IF_ETH_1 = 11 , SBG_ECOM_IF_ETH_2 = 12 , SBG_ECOM_IF_ETH_3 = 13 , SBG_ECOM_IF_ETH_4 = 14 , SBG_ECOM_IF_DATA_LOGGER = 20 } |
enum | _SbgEComPortMode { SBG_ECOM_UART_MODE_OFF = 0 , SBG_ECOM_UART_MODE_232 = 1 , SBG_ECOM_UART_MODE_422 = 2 } |
enum | _SbgEComCanBitRate { SBG_ECOM_CAN_BITRATE_DISABLED = 0 , SBG_ECOM_CAN_BITRATE_10 = 10 , SBG_ECOM_CAN_BITRATE_20 = 20 , SBG_ECOM_CAN_BITRATE_25 = 25 , SBG_ECOM_CAN_BITRATE_50 = 50 , SBG_ECOM_CAN_BITRATE_100 = 100 , SBG_ECOM_CAN_BITRATE_125 = 125 , SBG_ECOM_CAN_BITRATE_250 = 250 , SBG_ECOM_CAN_BITRATE_500 = 500 , SBG_ECOM_CAN_BITRATE_750 = 750 , SBG_ECOM_CAN_BITRATE_1000 = 1000 } |
enum | _SbgEComCanMode { SBG_ECOM_CAN_MODE_UNDEFINED = 0 , SBG_ECOM_CAN_MODE_SPY = 1 , SBG_ECOM_CAN_MODE_NORMAL = 2 , SBG_ECOM_CAN_NR_MODE } |
Functions | |
SbgErrorCode | sbgEComCmdInterfaceGetUartConf (SbgEComHandle *pHandle, SbgEComPortId interfaceId, SbgEComInterfaceConf *pConf) |
SbgErrorCode | sbgEComCmdInterfaceSetUartConf (SbgEComHandle *pHandle, SbgEComPortId interfaceId, const SbgEComInterfaceConf *pConf) |
SbgErrorCode | sbgEComCmdInterfaceGetCanConf (SbgEComHandle *pHandle, SbgEComCanBitRate *pBitrate, SbgEComCanMode *pMode) |
SbgErrorCode | sbgEComCmdInterfaceSetCanConf (SbgEComHandle *pHandle, SbgEComCanBitRate bitRate, SbgEComCanMode mode) |
Commands used to configure device serial, CAN and Ethernet interfaces.
The MIT license
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef enum _SbgEComPortId SbgEComPortId |
List of serial interfaces available.
typedef enum _SbgEComPortMode SbgEComPortMode |
List of serial modes available.
typedef struct _SbgEComInterfaceConf SbgEComInterfaceConf |
Helper structure to configure a serial interface
typedef enum _SbgEComCanBitRate SbgEComCanBitRate |
Enum containing the list of all available bit rates (in KB/s).
typedef enum _SbgEComCanMode SbgEComCanMode |
Enum containing the list of different CAN modes
enum _SbgEComPortId |
List of serial interfaces available.
enum _SbgEComPortMode |
enum _SbgEComCanBitRate |
Enum containing the list of all available bit rates (in KB/s).
enum _SbgEComCanMode |
SbgErrorCode sbgEComCmdInterfaceGetUartConf | ( | SbgEComHandle * | pHandle, |
SbgEComPortId | interfaceId, | ||
SbgEComInterfaceConf * | pConf | ||
) |
Retrieve the configuration of one of the interfaces.
[in] | pHandle | A valid sbgECom handle. |
[in] | interfaceId | The interface from which the configuration is to be retrieved. |
[out] | pConf | Pointer to a SbgEComInterfaceConf struct to hold configuration of the interface. |
SbgErrorCode sbgEComCmdInterfaceSetUartConf | ( | SbgEComHandle * | pHandle, |
SbgEComPortId | interfaceId, | ||
const SbgEComInterfaceConf * | pConf | ||
) |
Set the configuration of one of the interfaces.
[in] | pHandle | A valid sbgECom handle. |
[in] | interfaceId | The interface from which the configuration is to be retrieved. |
[in] | pConf | Pointer to a SbgEComInterfaceConf struct that holds the new configuration for the interface. |
SbgErrorCode sbgEComCmdInterfaceGetCanConf | ( | SbgEComHandle * | pHandle, |
SbgEComCanBitRate * | pBitrate, | ||
SbgEComCanMode * | pMode | ||
) |
Retrieve the configuration of the CAN interface.
[in] | pHandle | A valid sbgECom handle. |
[out] | pBitrate | The bitrate of the CAN interface. |
[out] | pMode | Mode of the CAN interface. |
SbgErrorCode sbgEComCmdInterfaceSetCanConf | ( | SbgEComHandle * | pHandle, |
SbgEComCanBitRate | bitRate, | ||
SbgEComCanMode | mode | ||
) |
Set the configuration of the CAN interface.
[in] | pHandle | A valid sbgECom handle. |
[in] | bitRate | The bitrate of the CAN interface. |
[in] | mode | Mode of the CAN interface. |