63 typedef int ( *
I2CImpl_t ) (
void*, uint8_t, uint8_t*, int, uint8_t*, int );
110 void ( *msSleep ) ( uint32_t ms );
116 int ( *reset ) (
void* handle );
165 typedef char const* ( *ErrorStringGenerator_t ) ( int, int,
char*, int );
213 char const*
HAL_GetErrorInfo (
int* error,
int* scope,
char* str,
int bufSize );
GenericError_t
Error code definitions.
Definition: hal.h:21
char const *(* ErrorStringGenerator_t)(int, int, char *, int)
Function type used for generation of error strings.
Definition: hal.h:165
HALError_t
HAL scope error definitions.
Definition: hal.h:47
char const * HAL_GetErrorString(int error, int scope, char *str, int bufSize)
Error string generator for HAL-scoped errors.
ErrorScope_t
Success status code and error scopes.
Definition: hal.h:32
int HAL_Init(Interface_t *hal)
Initialize hardware and populate Interface_t object.
Definition: template.c:73
I2CImpl_t i2cRead
Definition: hal.h:90
void * handle
Definition: hal.h:71
A structure of pointers to hardware specific functions.
Definition: hal.h:69
int HAL_SetError(int error, int scope, ErrorStringGenerator_t errStrFn)
Function storing error information.
void HAL_HandleError(int errorCode, void const *context)
Error handling function.
Definition: template.c:105
char const * HAL_GetErrorInfo(int *error, int *scope, char *str, int bufSize)
Get detailed information for last error.
I2CImpl_t i2cWrite
Definition: hal.h:104
int(* I2CImpl_t)(void *, uint8_t, uint8_t *, int, uint8_t *, int)
Function pointer type defining signature of I2C functions.
Definition: hal.h:63
int HAL_Deinit(Interface_t *hal)
Cleanup before program exit.
Definition: template.c:95