Add kStatus_Uhk_IdleSlave and ditch the global IsI2cTransferScheduled. Make slave drivers return status_t and utilize that value instead.

This commit is contained in:
László Monda
2017-08-19 17:47:56 +02:00
parent 430c02f0ed
commit 946d3c1451
8 changed files with 38 additions and 26 deletions
+9 -1
View File
@@ -14,7 +14,7 @@
} slave_id_t;
typedef void (slave_init_t)(uint8_t);
typedef void (slave_update_t)(uint8_t);
typedef status_t (slave_update_t)(uint8_t);
typedef struct {
uint8_t perDriverId; // Identifies the slave instance on a per-driver basis
@@ -23,6 +23,14 @@
bool isConnected;
} uhk_slave_t;
typedef enum {
kStatusGroup_Uhk = -1,
} uhk_status_group_t;
typedef enum {
kStatus_Uhk_IdleSlave = MAKE_STATUS(kStatusGroup_Uhk, 0),
} uhk_status_t;
// Variables:
extern uhk_slave_t Slaves[];