ZMOD4510 Nitrogen Dioxide and Ozone Firmware Documentation |

Files | Functions | Data Structures | Macros | Typedefs | Enumerations
HiCom Board API
Hardware Abstraction Layer API » ComBoard HAL

## Files
file | hicom.h
| HiCom board type and function declarations.

## Functions
int | HiCom_Find (HiComInterface_t *board, int *count)
| Enumerate HiCom boards Scans USB ports for connected HiCom boards. More...
int | HiCom_Connect (HiComInterface_t *board)
| Connect a HiCom instance Tries to connect to an interface that has been discovered with HiCom_Find() previously. More...
int | HiCom_Disconnect (HiComInterface_t *board)
| Disconnect a HicomBoard. More...
int | HiCom_SetPower (HiComInterface_t *board, bool on)
| Switch sensor power supply on or off. More...
int | HiCom_I2CWrite (HiComInterface_t *board, uint8_t slAddr, uint8_t *wData1, int wSize1, uint8_t *wData2, int wSize2)
int | HiCom_I2CRead (HiComInterface_t *board, uint8_t slAddr, uint8_t *wData, int wSize, uint8_t *rData, int rSize)
char const * | HiCom_GetErrorString (int error, int scope, char *buf, int bufLen)

## Data Structures
struct | HiComInterface_t

## Macros
#define | HICOM_NAME "Dual RS232-HS A"
#define | HICOM_I2C_SPEED 100000

## Typedefs
typedef FT_STATUS | HiComStatus_t
typedef FT_HANDLE | HiComHandle_t

## Enumerations
enum | HiComErrorScope_t { iesFTDI = 0x21 }

## Detailed Description

## Data Structure Documentation

## ◆ HiComInterface_t

struct HiComInterface_t

### Data Fields
FT_DEVICE_LIST_INFO_NODE | node
int | index

## Function Documentation

## ◆ HiCom_Connect()

int HiCom_Connect | ( | HiComInterface_t * | board | ) |

Connect a HiCom instance Tries to connect to an interface that has been discovered with HiCom_Find() previously.

Parameters

  board | Pointer to HiCom board discovered by HiCom_Find()

Returns
  int 0 on success, error code otherwise

## ◆ HiCom_Disconnect()

int HiCom_Disconnect | ( | HiComInterface_t * | board | ) |

Disconnect a HicomBoard.

Parameters

  board | Pointer to HiCom board to be disconnected

Returns
  int

## ◆ HiCom_Find()

int HiCom_Find | ( | HiComInterface_t * | board,
|  | int * | count
| ) |  |

Enumerate HiCom boards Scans USB ports for connected HiCom boards.

Parameters

  board | pointer to a buffer storing board information
  count | [in] maximum count of boards to be stored [out] actual number of boards stored

Returns
  int 0 on success, error code otherwise

## ◆ HiCom_GetErrorString()

char const* HiCom_GetErrorString | ( | int | error,
|  | int | scope,
|  | char * | buf,
|  | int | bufLen
| ) |  |

Generate a descriptive error message

Parameters

  [in] | error | Error code
  [in] | scope | Error scope

Returns
  Error string

## ◆ HiCom_I2CRead()

int HiCom_I2CRead | ( | HiComInterface_t * | board,
|  | uint8_t | slAddr,
|  | uint8_t * | wData,
|  | int | wSize,
|  | uint8_t * | rData,
|  | int | rSize
| ) |  |

HiCom implementation of HAL_t::i2cRead

## ◆ HiCom_I2CWrite()

int HiCom_I2CWrite | ( | HiComInterface_t * | board,
|  | uint8_t | slAddr,
|  | uint8_t * | wData1,
|  | int | wSize1,
|  | uint8_t * | wData2,
|  | int | wSize2
| ) |  |

HiCom implementation of HAL_t::i2cWrite

## ◆ HiCom_SetPower()

int HiCom_SetPower | ( | HiComInterface_t * | board,
|  | bool | on
| ) |  |

Switch sensor power supply on or off.

Parameters

  board | Pointer to HiCom board to be operated

Returns
  int 0 on success, error code otherwise