Update AS5040.h

changed to C99 declarations, added error struct.