De-assert nWAKE after exit.

This commit is contained in:
imi415 2021-07-18 02:03:27 +08:00
parent bc3dce3739
commit 4161d3c6df
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ int user_ccs811_impl_init(user_ccs811_impl_t *impl) {
int user_ccs811_impl_deinit(user_ccs811_impl_t *impl) {
close(impl->i2cdev_fd);
if(impl->nwake_pin != NULL) {
user_gpio_set(impl->nwake_pin, 1);
user_gpio_deinit(impl->nwake_pin);
free(impl->nwake_pin);
}