xil-se / xildebug_sw

XilDebug is a CMSIS-DAP compliant debugger, UART bridge and power profiler all in one package.
5 stars 1 forks source link

Check if i2c handle is initialized #6

Closed arturo182 closed 6 years ago

arturo182 commented 6 years ago

https://github.com/xil-se/xildebug_sw/blob/b5ef8b66cc7f98fa468062f20203c5f07501058a/app/drivers/i2c.c#L61

https://github.com/xil-se/xildebug_sw/blob/b5ef8b66cc7f98fa468062f20203c5f07501058a/app/drivers/i2c.c#L66

kbeckmann commented 6 years ago

Sure. But before that, I think we should decide on an error strategy other than HAL_StatusTypeDef

arturo182 commented 6 years ago

So my idea is to have a errors.h file with base defines per module and then in each module have custom error codes using the base + 1, 2, 3, etc. This way each module gets unique errors :)

kbeckmann commented 6 years ago

Ok I can fix it.