2016-08-17 17:58:21 -07:00
|
|
|
/*
|
|
|
|
* Authors:
|
|
|
|
* Copyright (c) 2016 Intel Corporation.
|
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
* terms of the The MIT License which is available at
|
|
|
|
* https://opensource.org/licenses/MIT.
|
2016-08-17 17:58:21 -07:00
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2016-08-17 17:58:21 -07:00
|
|
|
*/
|
|
|
|
#ifndef UPM_SWITCH_H_
|
|
|
|
#define UPM_SWITCH_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Switch function table
|
|
|
|
typedef struct _upm_switch_ft {
|
|
|
|
upm_result_t (*upm_switch_get_value) (void* dev, bool* value, int num);
|
|
|
|
upm_result_t (*upm_switch_attach_isr) (void* dev, void (*isr)(void *), void *arg);
|
|
|
|
upm_result_t (*upm_switch_clear_isr) (void* dev);
|
|
|
|
} upm_switch_ft;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* UPM_SWITCH_H_ */
|