ZMOD4510 Nitrogen Dioxide and Ozone Firmware Documentation |

Data Structures | Typedefs | Enumerations | Functions
hal.h File Reference
Hardware Abstraction Layer API

Renesas Environmental Sensor HAL definitions. More...

Go to the source code of this file.

## Data Structures
struct | Interface_t
| A structure of pointers to hardware specific functions. More...

## Typedefs
typedef int(* | I2CImpl_t) (void *, uint8_t, uint8_t *, int, uint8_t *, int)
| Function pointer type defining signature of I2C functions. More...
typedef char const *(* | ErrorStringGenerator_t) (int, int, char *, int)
| Function type used for generation of error strings. More...

## Enumerations
enum | GenericError_t { ecSuccess = 0, ecHALError = 0x100 }
| Error code definitions. More...
enum | ErrorScope_t { esSensor = 0x0000, esAlgorithm = 0x1000, esInterface = 0x2000, esHAL = 0x3000 }
| Success status code and error scopes. More...
enum | HALError_t { heNoInterface = 1, heNotImplemented, heI2CReadMissing, heI2CWriteMissing, heSleepMissing, heResetMissing }
| HAL scope error definitions. More...

## Functions
int | HAL_Init (Interface_t *hal)
| Initialize hardware and populate Interface_t object. More...
int | HAL_Deinit (Interface_t *hal)
| Cleanup before program exit. More...
void | HAL_HandleError (int errorCode, void const *context)
| Error handling function. More...
int | HAL_SetError (int error, int scope, ErrorStringGenerator_t errStrFn)
| Function storing error information. More...
char const * | HAL_GetErrorInfo (int *error, int *scope, char *str, int bufSize)
| Get detailed information for last error. More...
char const * | HAL_GetErrorString (int error, int scope, char *str, int bufSize)
| Error string generator for HAL-scoped errors. More...