Remove spinlock, change to i2c_readwrite where appropriate , and consolidate i2c read and write calls.

This commit is contained in:
TimJTi
2023-09-02 16:26:10 +03:00
committed by Petro Karashchenko
parent c27c33e9a9
commit 3b4ea52a79
2 changed files with 51 additions and 109 deletions
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -191,10 +191,10 @@ struct apds9922_als_setup_s
{
int rate; /* als measurement rate */
int res; /* als resolution */
int gain; /* als gain */
uint8_t gain; /* als gain */
struct adps9922_als_thresh
thresh; /* Upper and lower thresholds */
int thresh_var; /* threshold variation */
uint8_t thresh_var; /* threshold variation */
int int_mode; /* Interrupt mode */
uint8_t persistance; /* Num events before interrupt */
uint32_t als_factor; /* Lux correction factor applied */
@@ -227,7 +227,7 @@ struct apds9922_ps_setup_s
struct apds9922_ps_data
{
uint16_t ps; /* Current prximity measure */
uint16_t ps; /* Current proximity measure */
bool close; /* Object is far (false) or close */
};