ZMOD4510 Nitrogen Dioxide and Ozone Firmware Documentation
hicom.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2024 Renesas Electronics Corporation
3  * All Rights Reserved.
4  *
5  * This code is proprietary to Renesas, and is license pursuant to the terms and
6  * conditions that may be accessed at:
7  * https://www.renesas.com/eu/en/document/msc/renesas-software-license-terms-gas-sensor-software
8  *****************************************************************************/
9 
20 #ifndef _HICOM__H_
21 #define _HICOM__H_
22 
23 #include <stdint.h>
24 #include <stdbool.h>
25 
26 #include "hal/hal.h"
27 #include "hal/3rdParty/ftdi/libmpsse_i2c.h"
28 
29 
30 #define HICOM_NAME "Dual RS232-HS A"
31 #define HICOM_I2C_SPEED 100000
32 
33 
34 typedef FT_STATUS HiComStatus_t;
35 typedef FT_HANDLE HiComHandle_t;
36 
37 typedef enum {
38  iesFTDI = 0x21
39 } HiComErrorScope_t;
40 
41 
42 typedef struct {
43  FT_DEVICE_LIST_INFO_NODE node;
44  int index;
46 
56 int HiCom_Find ( HiComInterface_t* board, int* count );
57 
66 int HiCom_Connect ( HiComInterface_t* board );
67 
74 int HiCom_Disconnect ( HiComInterface_t* board );
75 
82 int HiCom_SetPower ( HiComInterface_t* board, bool on );
83 
85 int HiCom_I2CWrite ( HiComInterface_t* board, uint8_t slAddr, uint8_t* wData1, int wSize1, uint8_t* wData2, int wSize2 );
86 
88 int HiCom_I2CRead ( HiComInterface_t* board, uint8_t slAddr, uint8_t* wData, int wSize, uint8_t* rData, int rSize );
89 
95 char const* HiCom_GetErrorString ( int error, int scope, char* buf, int bufLen );
96 
99 #endif /* _HICOM__H_ */
Definition: hicom.h:42
char const * HiCom_GetErrorString(int error, int scope, char *buf, int bufLen)
int HiCom_Disconnect(HiComInterface_t *board)
Disconnect a HicomBoard.
Renesas Environmental Sensor HAL definitions.
int HiCom_Find(HiComInterface_t *board, int *count)
Enumerate HiCom boards Scans USB ports for connected HiCom boards.
int HiCom_Connect(HiComInterface_t *board)
Connect a HiCom instance Tries to connect to an interface that has been discovered with HiCom_Find() ...
int HiCom_I2CRead(HiComInterface_t *board, uint8_t slAddr, uint8_t *wData, int wSize, uint8_t *rData, int rSize)
int HiCom_SetPower(HiComInterface_t *board, bool on)
Switch sensor power supply on or off.
int HiCom_I2CWrite(HiComInterface_t *board, uint8_t slAddr, uint8_t *wData1, int wSize1, uint8_t *wData2, int wSize2)