Return errors on open functions

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2023-09-08 13:04:05 +02:00
parent 2bd57ee0dd
commit b074ab72fc
No known key found for this signature in database
GPG key ID: D850A5F772E880F9
8 changed files with 72 additions and 90 deletions

View file

@ -60,7 +60,9 @@ enum device3_error_t {
DEVICE3_ERROR_UNEXPECTED = 10,
DEVICE3_ERROR_WRONG_SIGNATURE = 11,
DEVICE3_ERROR_INVALID_VALUE = 12,
DEVICE3_ERROR_UNKNOWN = 13,
DEVICE3_ERROR_NOT_INITIALIZED = 13,
DEVICE3_ERROR_PAYLOAD_FAILED = 14,
DEVICE3_ERROR_UNKNOWN = 15,
};
struct __attribute__((__packed__)) device3_packet_t {
@ -144,7 +146,7 @@ struct device3_t {
typedef struct device3_t device3_type;
device3_type* device3_open(device3_event_callback callback);
device3_error_type device3_open(device3_type* device, device3_event_callback callback);
device3_error_type device3_reset_calibration(device3_type* device);