CTL_STATUS_t sensecore_set_cs_signal(SENSECORE_DRIVER_t *self,
                                     int site,
                                     int state);

sensecore_set_cs_signal sets the SenseCore CS (site-select) signal for site site to state. If state is zero, the CS signal is pulled low and if state is non-zero the CS signal is pulled high.

Note that the SenseCore driver does not ensure that a single site is uniquely selected: it is the client's responsibility to ensure proper selection and deselection of each of the sites or to use sensecore_select_site.

Return Value

sensecore_set_cs_signal returns a standard status code.

Thread Safety

sensecore_set_cs_signal is thread-safe if the transport member in self is thread-safe. This requires that a mutex is associated with the I2C bus provided when initializing self.