Sylvain Munaut | bc9f5c4 | 2020-09-14 10:22:29 +0200 | [diff] [blame] | 1 | /* |
2 | * misc.h | ||||
3 | * | ||||
4 | * Copyright (C) 2019-2020 Sylvain Munaut <tnt@246tNt.com> | ||||
5 | * SPDX-License-Identifier: GPL-3.0-or-later | ||||
6 | */ | ||||
7 | |||||
8 | #pragma once | ||||
9 | |||||
10 | #include <stdbool.h> | ||||
11 | #include <stdint.h> | ||||
12 | |||||
13 | enum pdm_chan { | ||||
14 | PDM_CLK_LO = 0, | ||||
15 | PDM_CLK_HI = 1, | ||||
16 | PDM_E1_N = 2, | ||||
17 | PDM_E1_P = 3, | ||||
18 | PDM_E1_CT = 4, | ||||
19 | }; | ||||
20 | |||||
21 | void pdm_set(int chan, bool enable, unsigned value, bool normalize); | ||||
22 | |||||
23 | uint16_t e1_tick_read(void); |