Line data Source code
1 0 : /* 2 : * Copyright (c) 2022 ITE Technology Corporation. 3 : * 4 : * SPDX-License-Identifier: Apache-2.0 5 : */ 6 : #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_ 7 : #define ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_ 8 : 9 : /** 10 : * @name it8xxx2 voltage comparator channel references 11 : * @{ 12 : */ 13 : 14 0 : #define VCMP_CHANNEL_0 0 15 0 : #define VCMP_CHANNEL_1 1 16 0 : #define VCMP_CHANNEL_2 2 17 0 : #define VCMP_CHANNEL_3 3 18 0 : #define VCMP_CHANNEL_4 4 19 0 : #define VCMP_CHANNEL_5 5 20 0 : #define VCMP_CHANNEL_CNT 6 21 : 22 : /** @} */ 23 : 24 : /** 25 : * @name it8xxx2 voltage comparator scan period for "all comparator channel" 26 : * @{ 27 : */ 28 : 29 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_100US 0x10 30 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_200US 0x20 31 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_400US 0x30 32 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_600US 0x40 33 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_800US 0x50 34 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_1MS 0x60 35 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_1_5MS 0x70 36 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_2MS 0x80 37 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_2_5MS 0x90 38 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_3MS 0xa0 39 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_4MS 0xb0 40 0 : #define IT8XXX2_VCMP_SCAN_PERIOD_5MS 0xc0 41 : 42 : /** @} */ 43 : 44 : /** 45 : * @name it8xxx2 voltage comparator interrupt trigger mode 46 : * @{ 47 : */ 48 : 49 0 : #define IT8XXX2_VCMP_LESS_OR_EQUAL 0 50 0 : #define IT8XXX2_VCMP_GREATER 1 51 0 : #define IT8XXX2_VCMP_UNDEFINED 0xffff 52 : 53 : /** @} */ 54 : #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_ */